Clean up handling of segments.  Make strip setup safer.