Pep8 and other cleanups