     # @param tumor the tumor object
     # @returns the RCB object extended with index and class properties
     residualCancerBurden: (tumor) ->
-      # Returns the RCB index.
+      # @param extent the tumor extent {length, width, depth} REST object
+      # @param rcb the RCB REST object
+      # @returns the RCB index
       rcbIndex = (extent, rcb) ->
         # The bidimensional tumor size metric.
         size = Math.sqrt(extent.length * extent.width)

        inSitu = rcb.dcisCellDensity / 100
        # The invasive carcinoma proportion.
        invasion = (1 - inSitu) * overall
        # Calculate and return the index value.
        return (1.4 * Math.pow(invasion * size, 0.17)) +
                Math.pow(4 * ((1 - Math.pow(0.75, rcb.positiveNodeCount)) *
                           rcb.largestNodalMetastasisLength),
                         0.17)
      # Returns the RCB class, which is based on RCB index cut-offs.
      rcbClass = (rcbIndex) ->
        if rcbIndex == 0
          return 0

          return 3

      # If the RCB object exists, return it extended with the index and class.
      rcb = tumor.rcb
      if rcb?
        rcb.rcbIndex = rcbIndex(tumor.extent, tumor.rcb)
        rcb.rcbClass = rcbClass(score)
      else
        return null

