 
   ## Search Result Validation Functions
 
-  validateResults: (res)->
-    ## TODO: make this work
-    false
-
-  hasGardenTheme: (res, target)->
-    res['theme_slug'] && (res['theme_slug'].toLowerCase() == target || res['theme'].toLowerCase() == target)
-
-  hasGardenWidget: (res, target)->
-    ret = false
-    return false if (!res['garden_widgets'] || !res['garden_widget_slugs'])
-    $.each res['garden_widgets'], (idx, widget)->
-      if !ret && widget.toLowerCase() == target
-        ret = true
-    return ret if ret
-    $.each res['garden_widget_slugs'], (idx, slug)->
-      if !ret && slug.toLowerCase() == target
-        ret = true
-    ret
-
-  hasStatus: (res, target)->
-    res['status'] && res['status'].toLowerCase() == target
+  hasGardenWidget: (res, widget)->
+    $.inArray(widget, res['garden_widget_slugs'])
 
   getAppName: (elem)->
     $.trim(elem.find('.app-name').text())

  parseSearchResults: (locations, elem)->
    results = []
    $.each locations, (idx, res)=>
      @addToPageCount(res) if @hasWidgetValue()
      results.push(res)
    if results.length
      @incCmsFound()

  constructor: ()->
    @cms = $('.cms')
    @cmsCount = @cms.find('.app-item').length
    @initForm()
    @initSelectField('widgets', @widgetInput)
    @initSelectField('web_themes', @themeInput)
