flake8 cleanups

Not sure how strict we want to be about this, so just throwing it out there for discussion.