Code cleanup from pyflakes analysis.

Removed unused imports and variables.