         )
       return response
 
-    load_doc_static : (docid, data) ->
+    load_doc_static: (docid, data) ->
       """ loads data without making a websocket connection """
       load_data(data['all_models'])
       promise = jQuery.Deferred()
       promise.resolve()
       return promise
 
-
-    load_doc : (docid) ->
+    load_doc: (docid) ->
       wswrapper = utility.make_websocket();
       response = $.get(Config.prefix + "/bokeh/bokehinfo/#{docid}/", {})
         .done((data) ->

      exports.plotcontext = plotcontext
      exports.plotcontextview = plotcontextview

    bokeh_connection : (host, docid, protocol) ->
      if _.isUndefined(protocol)
        protocol="https"
      if  Promises.doc_requested.state() == "pending"
        Deferreds._doc_requested.resolve()
        $.get("#{protocol}://#{host}/bokeh/publicbokehinfo/#{docid}", {}, (data) ->
          console.log('instatiate_doc_single, docid', docid)

define [
  "common/base",
  "server/serverutils",
  "common/has_properties",
  "common/socket",
  "common/load_models"
], (base, serverutils, HasProperties, socket, load_models) ->

  #not proud of this refactor... but we can make it better later
  Deferreds = {}
  Promises = {}
