Python Style cleanup

There are lot of changes in this branch, but they are nearly entirely all cosmetic.

I ran `tests/messages_test.py` and everything appears to still be working, but I would appreciate any other tests people can run before merging this into master.