Make a proper view model
Extract view model to separate file
Print groups to home page