pep8 fixes and cleaned up tests