formatting and grouping cleanup