       method = 'POST'
       url = 'tastes/'
 
-    data = getContent().trim().replace(/\s+\n/g, '\n')
-    data += '\n'  if data.length
-    unless data.length
-      setContent(data)  if data isnt getContent()
-      return true
+    currentContent = getDomContent().trim().replace(/\s+\n/g, '\n')
+    currentContent += '\n'  if currentContent.length
+    setDomContent currentContent  if currentContent isnt getDomContent()
+    return true  unless currentContent.length
 
     always = () ->
       edit()
 
-    done = (responseData, status, xhr) ->
+    done = (body, status, xhr) ->
       if method is 'POST'
         window.location.hash = xhr.getResponseHeader 'Location'
       else

$ () ->
  data = ''
  $linenos = $ '#linenos'
  $linenosCode = $ '> code', $linenos
  $editor = $ '#editor'


  startEditing = (evt) ->
    evt.preventDefault()
    edit currentContent
    $editor.off 'dblclick', startEditing
    false

