There should be no changed functionality here. Just cleaning: - Consistent variable naming style - Consistent quote types for strings - No lines over 80 characters - At least some comment for every function - Get rid of excessive error catching
Have a non-collection function for this, then a method of SegmentCollection which uses that function.