   near = "#{map.getCenter().lng}|#{map.getCenter().lat}" if not near
   url = "/api/c/challenges/#{challenge}/tasks?near=#{near}"
   request = $.ajax {url: url}
-  request.done((data) ->
+  request.done (data) ->
     currentTask = data[0]
-    showTask(data[0]))
-  request.fail(ajaxErrorHandler)
+    showTask(data[0])
+  request.fail (ajaxErrorHandler)
 
 changeMapLayer = (layerUrl, layerAttrib = tileAttrib) ->
   ###

      tileAttrib = data.tileasttribution if data.tileattribution?
      changeMapLayer(tileURL, tileAttrib)
    currentChallenge.help = markdown.makeHtml(currentChallenge.help)
    currentChallenge.doneDlg = makeDlg(currentChallenge.doneDlg))
  request.fail(ajaxErrorHandler)

enableKeyboardShortcuts = ->
  ###

  # Gets a specific challenge
  ###
  request = $.ajax {url: "/api/c/challenges/#{id}"}
  request.done (data) ->
    challenge = data
    updateChallenge(challenge)
    updateStats(challenge)
    getTask()
  request.fail (ajaxErrorHandler)

@getNewChallenge = (difficulty, near) ->
  ###
