Add namespace/schemata support
Clean up schemata patch