Rough pass at correcting the pep8 issues.

Rebasing yet again...
Change-Id: Iaee489e48d135c530984737efd1ade34bf0de49a