                 return
 
     merge_objs: (obj1, obj2) =>  # may modify objs
-        console.log("obj1 = ", obj1)
-        console.log("obj2 = ", obj2)
+        #console.log("obj1 = ", obj1)
+        #console.log("obj2 = ", obj2)
         cells = obj1.worksheets[0].cells
 
         return obj1
 
     init_buttons: () =>
         @save_button = @element.find("a[href=#save]").click () =>
-            @save_checkpoint()
+            @save()
             return false
 
         @element.find("a[href=#info]").click () =>

                    setTimeout(f, 100)

    autosync: () =>
        console.log("autosync")
        if @frame.IPython.notebook.dirty
            @save_checkpoint()
            @frame.IPython.notebook.dirty = false

    save_checkpoint: () =>
        console.log("save checkpoint!")
        obj = @to_obj()
        v1 = misc.to_json(obj)
        @doc.live(v1)

        @doc.sync () =>
            @save_button.icon_spin(false)

    save: (cb) =>
        obj = @to_obj()
        v1 = misc.to_json(obj)
        @doc.live(v1)
        @save_button.icon_spin(start:true,delay:500)
        @doc.save () =>
            @save_button.icon_spin(false)
            @save_button.addClass('disabled')
            cb?()

    doc_sync: () =>

        v1 = @doc.live()

