Various changes, more tests.