         Promises.doc_promises[docid] = doc_prom
         return doc_prom
 
-    load_doc_by_title : (title) ->
+    load_doc_by_title: (title) ->
       response = $.get(Config.prefix + "/bokeh/doc", {title : title})
         .done((data) ->
           all_models = data['all_models']

  exports.Promises = Promises
  HasProperties.prototype.sync = Backbone.sync


  utility =
    load_user : () ->
      response = $.get('/bokeh/userinfo/', {})
      return response


    load_doc_once : (docid) ->
      if _.has(Promises.doc_promises, docid)
        console.log("already found #{docid} in promises")
        return Promises.doc_promises[docid]

      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)
