Right now formatting is done together with grouping and prep work. Split this a bit better to support more use-cases...