clean up Segment class