Reformatting with Flake8

The code should be much nicer now.

It was supposed to include a *Read More* patch, but it was broken anyway, and I need to rethink it.