Entity templates and undo/redo