First iteration of code clean up. Comments not added yet