       jtodo = min(32, jc1 - j);
       for (k = 0; k < jtodo; k++) {                        // Sequentially update counts so that each thread
         if (threadIdx.x == k) {                            // in this warp gets the old and new counts
-          ccnt = catcnt[icat + ncats * threadIdx.y];       // save data for item k in thread k
+          ccnt = catcnt[icat + ncats * threadIdx.y];       // i.e. data for item k is in thread k
           cnew = ccnt + cnt;
           catcnt[icat + ncats * threadIdx.y] = cnew;
         }

      ctot += cnt;                                        // Now update the total c and total ci log ci sums
      cacc += update;
      ctot = max(1, ctot);
      impty = T::ffinal(cacc, (float)ctot);              // And the impurity for this input

      tmp = __shfl_up(ival, 1);
      tmpx = __shfl_up(impty, 1);                         // Need the last impurity and ival in order

        lastival = tmp;
        lastimpty = tmpx;
      }

      if (ival == lastival) lastimpty = 1e7f;             // Eliminate values which are not at value boundaries
      if (lastimpty < minimpty) {
        minimpty = lastimpty;
