Pep8 and other misc cosmetics.

I still work on it, I'll ping you as soon as I have finished.