Cleanups and error fixes suggested by flake8 (pep8 + pyflakes)
Merge pull request #151 from balr0g/flake8-cleanup

Cleanups and error fixes suggested by flake8 (pep8 + pyflakes)