pep8 + tests fixes