pep8 love, some minor logic tweaks, &c.

This is a huge PR (sorry!) but it fixes some Pep8 issues, and attempts to make some of the logic a bit more idiomatic. There's more that can be done here structurally, but I think this is good for PR1 :smile: 

Basically:

- pep8... ALL THE PYTHON
- switch logic like `if valid == True` to `if valid`
- minor message changes

I think the next one we could do a bit more structural work (like hoisting some of the `valid` code up into the `try` above it), but that can be PR2. Please test the _hell_ out of this once merged :smile_cat: