adds more tests and fixes a problem with schema identified by one of the tests.