Docstrings, checking and a better test can be run with python -i switch.py
Fix bug, remove verbose printing.