Mostly PEP8 and rm unused imports.
Merge pull request #3 from philipn/pep8_and_cleanup

Mostly PEP8 and rm unused imports. Closes issue #3