More sensible grouping API