Fixes a variety of pep8 issues

Change-Id: Ifdb161262175ca705f256511a403785ec218be0a