Cleaning up code