adds more unit tests and makes fixes errors in the schema found by the tests.