Improve code with Pylint suggestions