Fixing various unit test failures. Almost passing all tests in the node version!