Sort and group in prep for display