Added in Batch class
Cleanup of code