Refactored the validation and data load