Fix bunch of pyflakes lint errors