UndoStack as an external object