Fixed issue with xml repository overwriting ids
Cleaned up some unused templates
Fixed child ordering in xml repository