     unless param
       console.log dep.get('data').results
       throw new Error "Could not find param #{paramName} in #{dependency}"
-    rs = new RecordSet(param, @)
-    rs.sketchClass = dep.get('sketchClass')
-    rs
-
-  recordSets: (dependency, paramName) ->
-    unless dependency in @dependencies
-      throw new Error "Unknown dependency #{dependency}"
-    deps = _.filter @allResults, (result) -> result.get('name') is dependency
-    unless deps.length
-      console.log @allResults
-      throw new Error "Could not find results for #{dependency}."
-    params = []
-    for dep in deps
-      param = _.find dep.get('data').results, (param) -> 
-        param.paramName is paramName
-      unless param
-        console.log dep.get('data').results
-        throw new Error "Could not find param #{paramName} in #{dependency}"
-      rs = new RecordSet(param, @)
-      rs.sketchClass = dep.get('sketchClass')
-      params.push rs
-    return params
-
+    new RecordSet(param, @, sketchClassId)
 
   enableTablePaging: () ->
     @$('[data-paging]').each () ->


class RecordSet

  constructor: (@data, @tab) ->

  toArray: () ->
    _.map @data.value[0].features, (feature) ->
      feature.attributes

  raw: (attr) ->

    _.filter results, (result) ->
      result.paramName not in ['ResultCode', 'ResultMsg']

  recordSet: (dependency, paramName, sketchClassId=false) ->
    unless dependency in @dependencies
      throw new Error "Unknown dependency #{dependency}"
    dep = @reportResults.find (r) -> r.get('serviceName') is dependency
    unless dep
      console.log @reportResults.models
      throw new Error "Could not find results for #{dependency}."
