PEP8 and stylistic fixes