Refactor JsonSchema instatiation.