       # Free up server resources. Cause why not.
       socket.disconnect()
 
-  dosync: ->
+  # The main syncing function.
+  # It downloads the meta, then updates it to latest version as well as doing various other io.
+  # It's magic. Trust me.
+  doSync: ->
 
     # Downloads a meta file.
     $.ajax(

      "Notebook": Notebook.toJSON()
    }
    JSON.stringify(output)

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

      result = e.target.result
      @refresh(result or [], options)

  saveNote: (content, callback) ->
    trans = Sync.db.transaction(["notes"], "readwrite")
    store = trans.objectStore "notes"
    request = store.put(content, @id)

    request.onsuccess = (e) =>
      callback() if callback

  loadNote: (callback) ->
    trans = Sync.db.transaction(["notes"], "readwrite")
