minor code cleanup pep8 pylint