Some flake8 fixes
Add some comments...in lieu of tests
Make the setup module importable
Add unittests...which revealed some bugs.
module docstring