Mayor refactoring (PEP 008) using pylint