collapse: add docs for Irregular param
collapse: factor out group_rows
fix whitespace nonsense