Clean up code to follow PEP8