Simplified the undo manager example a bit.