Updated grouping default and dist code