Made changes to make pyflakes happy

Ran pyflakes and changed some imports to make it happy.