Refactoring and PEP8