     @saveButton.text "Save"
 
   save: ->
-    code = @editor.getSession().getValue()
-    mode = @modeEl.val()
-
-    @model.set
-      code: code,
-      mode: mode,
-      secret: @secret.getSecret()
-
     console.log "sending save #{ document.cookie }"
     @model.save null,
       success: (e) =>

    @initAce()

    @modeEl = @$('#mode')
    @modeEl.change =>
      @_setMode()
      @showUnsavedNotification()

    @model.bind "initialfetch", (e) =>
      @setEditorContents @model.get "code"
      @modeEl.val(@model.get "mode")
      @_setMode()
      @secret.setSecret @model.get "secret"

      if e.source is "default"

        @hideUnsavedNotification()


    @model.bind "change", => @showUnsavedNotification()


  setEditorContents: (code) ->
    @editor.getSession().setValue code
