Added undo manager constructor parameter