Minor fixes plus more tests.