pep8 and other code-style changes