Also fixes some pep8/flake8 errors so that this will merge correctly. Change-Id: I516badbf8890f8231469f54af929f40af7d81afe