Adding the batch documentations.

Also cleaning up a few things.