further fixes for templates to match removal of schemata nesting