Pep8 and minor fixes