Clean the code up