Unit tests catch more problems, which are now fixed
Numerous fixes to utils.py