Sweep for pep8 problems and common python gotchas.

Some python gotchas:
- id is a builtin method-- it's generally preferred not to overwrite it in any scope
- Comparisons with against booleans and None should use `is` instead of ==
- Default arguments should not be mutable, since they are defined at the methods define time.
- Naked exception catching is generally considered bad practice. I didn't fix all of these because I didn't want to risk breakages without unit tests.

Otherwise I made a sweep for formatting to match pep8 conventions. Read more about python formatting conventions here: https://www.python.org/dev/peps/pep-0008