Fixed pivot index generation.
Fixed labels and added optional lines for 4 major subgroups.