Cleaning up, tracking Data and refactoring functionality