Update code to work with Python 3.4 as well.

And make it so flake8 doesn't complain.