     document.head.appendChild link
     @codeMirrorEditor.setOption "theme", "ambiance"
 
-  setEditorMode:(file) ->
-    file or= @getOption 'file'
+  setEditorMode:(fileExtension) ->
 
-    return  unless file
+    return  unless fileExtension
 
     CodeMirror.modeURL = "#{cdnRoot}/mode/%N/%N.js"
-    fileExtension      = file.getExtension()
     syntaxHandler      = __aceSettings.syntaxAssociations[fileExtension]
     modeName           = null
     corrections        =

      json             : "javascript"
      js               : "javascript"
      go               : "go"

    if corrections[fileExtension]
      modeName = corrections[fileExtension]

    @firepad.setText content  if @amIHost
    @codeMirrorEditor.scrollTo 0, 0
    @emit "OpenedAFile", file, content
    @setEditorMode file.getExtension()

  save: ->
    file        = @getData()
