Code formatting / changes for pep-8 compliance

This PR gets our codebase up to pep 8 compliance for all but line length considerations, such as when being run via:

```
flake8 --ignore E501 .
```

The first commit deals just with whitespace changes and the subsequent commits deal with code/style changes.
The OpenStack style guide prefers not to wrap long lines with a backslash, so how about enclosing the math in parentheses instead?