Cleans some of the code