Fix pylint and pep8 warnings.