Some PEP8 related refactoring