Make codebase pep8 compliant

No significant changes, just making formatting / layout consistent with pep8 guidelines.