Adds/implements a Segment class, to match the Span class.