Revert "Revert "pep8 fixes""

This reverts commit bf229f2b17bd0bdd44005f33d859e38dcb11eafd.