Added UndoManager support.