Mostly pass flake8.

This commit makes most of the code pass flake8. I did skip some of the 80
char line violations but those were ones I didn't want to touch yet.
Merge pull request #21 from actown/master

Mostly pass flake8.