       else
         false
 
-  nb
+  exports

        unless version?
          run_context.cli.error "File #{file.filename} isn't a lead.js notebook"
          return
        import_notebook imported, options

  load_file = (run_context, file) ->
    if file.type.indexOf('image') < 0

    editor.setCursor(line: editor.lineCount() - 1)
    cell

  run_in_available_context = (notebook, code) ->
    add_context(notebook, code).run()
    add_context notebook

  # Add an input cell above the last input cell
  run_in_info_context = (current_cell, code) ->
    cell = create_input_cell current_cell.notebook, code
    current_cell.$el.before cell.$el
    index = notebook.indexOf cell
    cell.rendered()
    current_cell.notebook.splice index, 0, cell
    cell.run code

  create_input_cell = (notebook, code) ->
    $el = $ '<div class="cell input"/>'
    $code = $ '<div class="code"/>'
    $el.append $code
