Many more tests and fixes.