Changed the data handler to be more centralized and completed the class that gives errors.