Corrected comments and changed a variable name in SegmentTermPositions to better reflect the meaning of the variable