Cleaning up code and updating title