Separate out document enumeration into a domain class.
Move the segmentation into domain classes.