Add lots more tests and support for JSON Schema