pep8 and test fixes