Clean up pep8 and pylint violations

This cleans up pep8 and pylint violations on the feature branch. @wedaly, could you help me review this?
Why has this comment been moved here?