Pyflakes and error fixes.