pep8 and utility cleanup