Some changes made and added an DataHandler class