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