Fix Further Pyflakes warnings

Fix occurences of F811 and F821.

Change-Id: I961e62e818ab846f7e1bbc1fdabfe8c051fd70eb