Simple framework to undo and redo.