Use separate container for segments
Fix tests