Rename algorithm to "ST-group extraction" and restructure output code.