fixing error where children were not correctly added to the schema abstraction, adding more code to header and implementation templates