Reorganize trips into groups