 
       reader.readAsText file
 
-  nb =
+  exports =
     init_editor: ->
       init_codemirror()
       $document = $ '#document'
       $file_picker = $ '#file'
 
+
+      notebook = create_notebook()
+      $document.append notebook.$document
+
       $file_picker.on 'change', (e) ->
         for file in e.target.files
           load_file opening_run_context, file


    context

  bind_cli = (run_context) ->
    bind_op = (op) ->
      bound = (args...) ->

      [_..., extension] = file.filename.split '.'
      if extension is 'coffee'
        if options.run
          run_in_available_context run_context.notebook, file.content
        else
          add_context run_context.notebook, file.content
      else
        try
          imported = JSON.parse file.content
