BIG changes to new threading model. Its in place with one more bug to go - the unit_tests.html doesnt all pass yet