Milestone 1 cleaned up code