Refactored DataHandler