This looks pretty good, though the number of arguments getting passed around is getting a bit ridiculous-- might want to objectify this soon. Have you done a manual run to ensure that it works properly?