Cleaning the code: Part 1