Added camera id code to enable segmentation by camera id. Improved grouping sorting. Added function that discards any events shorter than 30 seconds