Refactor schemata to make it more customizable