More tests and other changes