Pylint and refactoring