Tidy up my code