Added plumbing for undo/redo