pep8'ified some things.

Things ignored for consistency with the project:
  * one liner trys and excepts;
  * line wrapping (79 characters is silly)