Added grouping algorithms and HTML tagging by row