Refactored Batch Validation and added some more tests