Extra work on #7 and #4 - added structure to save and load entity templates.