PEP8 and other minor changes