 
 S4 = -> (((1 + Math.random()) * 65536) | 0).toString(16).substring(1)
 
-# Convert Backone.js style options object based callbacks to Node.js style
-# single function callbacks used in ShareJS
-optionsCbToNodeCb = (options) -> (err) ->
-  if err
-    options?.error?()
-  else
-    options?.success?()
 
 
 Backbone.sync = (method, model, options) ->
-  console.log "METHOD", method
-
   # Call options.success() callback to trigger destroy event which triggers
   # synchronization to other browsers.
   if method is "delete"

  constructor: (models, opts={}) ->
    @classMap = {}
    @mapTypes opts.modelClasses if opts.modelClasses

    if opts.sharejsDoc
      @_syncDoc = opts.sharejsDoc

        if op.p[0] is @collectionId
          @parse op


  _flushAddingQueue: ->
    while model = @_addingQueue.shift()
      console.log "removing #{ model.get "name" } from queue"
      @add model

  _initSyncDoc: (cb) ->
    log "Creating new sync doc with #{ @collectionId }"
