       beforeSend: (xhr) ->
         xhr.setRequestHeader "Authorization", "Bearer " + localStorage.Token
     ).done((data) ->
-      result = Sync.merger(JSON.parse(Sync.exportData()), data, JSON.parse(localStorage.Queue))
+      console.log(JSON.parse(Sync.exportData()), data, JSON.parse(localStorage.Queue))
+      result = Sync.merger(JSON.parse(Sync.exportData()), data, Sync.Queue)
 
       console.log(result)
 

              xhr.setRequestHeader 'Authorization', 'Bearer ' + localStorage.Token
          ).done (data) ->
            console.log("all done! Delete the queue")
            localStorage.Queue = '{"Note": {}, "Notebook": {}}'


  connect: (fn) ->


  importData: (obj) ->
    input = JSON.parse(obj)
    Note.refresh(input.Note, clear: true)
    Notebook.refresh(input.Notebook, clear: true)

  # Merges the client & server, using a queue
  # Spits out the result, id changes & fs changes
