Fix a bunch of pyflakes.