Cleaning up my code