pep8 and minor stylistic changes