Setting up an UndoManager per session.