making some minor changes to remove pep8 violations where appropriate