Fixed pep8 and pylint issues