Cleaning Up Code Structure