         $target.append $item
         $item
 
+    notebook = input_cell.notebook
     run_context =
+      notebook: notebook
       ops: ops
       current_options: {}
-      default_options: default_options
+      default_options: notebook.default_options
       output: output $el
       success: ->
         scroll_to_result $top

        link.click()
        @output link
      get_input_value: (number) ->
        cell = nb.get_input_cell_by_number notebook, number
        cell?.editor.getValue()

      async: (fn) ->


      rc = localStorage.lead_rc
      if rc?
        run_in_available_context notebook, rc

      uri = URI location.href
      fragment = uri.fragment()
      if fragment.length > 0 and fragment[0] == '/'
        id = fragment[1..]
        run_in_available_context notebook, "gist #{JSON.stringify id}, run: true; quiet"
      else
        program = if location.search isnt ''
          atob decodeURIComponent location.search[1..]
        else
          'intro'

        run_in_available_context notebook, program

    run: (cell) ->
      cell.run()
      add_context cell.notebook

    handle_file: handle_file

