Pep8 stuff and fixing a couple of non-pythonic statements