Use the new "grouped" api.

This is for #72.