Fixed pylint and pep8 errors