Fix the last problems with test_basic_ops (which now passes completely)
Almost all problems fixed.