Implements spec-grouping; fix