add better undo, redo support, including cut, paste, and delete