add code to match new pep8 style checking and fix bugs.

Change-Id: Id5fd48b8149d3934e4854366e59475f37624ec24