Adding DataSegment and tests.