minor fixes, more tests.