new function GroupSLCClasses(), + minor changes