       console.log '%c> Calling fetch', 'background: #eee'
       Sync.defer(this, @loadLocal)
 
-    @change ->
-      console.log '%c> Calling change', 'background: #eee'
+    @change (record, event) ->
+      Sync.addToQueue(event, record)
+      console.log '%c> Calling change: ' + event, 'background: #eee'
       Sync.defer(this, @saveLocal)
 
     Sync.connect()

      fn() if typeof fn is 'function'
      @_clearPending()

Model.Sync =

  extended: ->

IN_PROGRESS = 1
ONLINE = 2

Sync =

  queue: JSON.parse localStorage.Queue or '{"Note": {}, "Notebook": {}}'

  # Hold pending actions
  pending: []
