Refactor according to PEP8