refactor to store schema data in json files and not php classes