Added functionality for UndoTree