 
     return
 
+  # Returns the YQL query
+  # str [String]
   self.getYQLurl = (str) ->
     q = "select * from xml where url="
-    url = "'" + str + "'"
-    "http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(q + url) + "&format=json&callback=?"
-
+    url = "'#{str}'"
+    return "http://query.yahooapis.com/v1/public/yql?q=#{encodeURIComponent(q + url)}&format=json&callback=?"
+
+  # Loads data for a given boardgame id
+  # id [String]
   self.getGameDetails = (id) ->
     if Modernizr.sessionstorage
       gdata = eval("(" + sessionStorage["bg" + id] + ")")

    location.hash = "game/" + object.id
    return

  Sammy(->
    @get "#search/:string", ->
      self.selectedGame null

      when "name" then self.sortByName()
      when "brating" then self.sortByBRating()
    return
  # Updates sort direction icons
  # type [String] (name,brating)
  # event [jQueryEvent]
  self.updateTableHeaders = (type,event) ->
    $("#results-table thead tr th").removeClass "headerSortUp"
    $("#results-table thead tr th").removeClass "headerSortDown"
