The Big Refactor

Batches are now processed in stages.
Fixed log messages.
Removed dead code.
Moved methods between models.
etc.