Small fixes and more tests.