some bug fixes and pylinting. FIXME: pylint & flake8 tests/*
fixed: flakes and pep8 in unit tests
Merge branch 'corrections'