Cleans up code