Unit test in progress
Tests can be run with Tingo too now. And all existing tests pass...
Minor fixes