fix pep8 and pylint errors

@sarina @wedaly 

Fixes a bunch of pep8 and pylint violations. The hotfix will add some violations to master; this PR is meant to help offset that.