run pyflakes and fix a few things