Several fixes (pyflakes/pep8)