     panel.attach(document.body)
 
     window.onresize = () -> panel.update()
-
-    amplify.subscribe 'outline-changed', (generation, source) ->
-        # console.log 'outline-changed', generation, source
-        if not doc.isClean(generation)
-            doc.setValue(outline.serialize())
-        if generation > outline.generation # and expose.doc and expose.outline
-            outline.reloadSerialization(doc.getValue())
 
     loadDefault = () ->
         cmTaskpaper.loadTarget './todo.taskpaper', () ->

# The main application entry point.
#
main = () ->
    panel = new DockPanel()
    panel.id = 'main'



    # Initialize CodeMirror document
    doc = cmTaskpaper.editor.doc
    docView = new DocView(syncMaster, doc)

    # Initialize outline
    outline = new birch.Outline.createTaskPaperOutline(syncMaster.data)
    outlineView = new OutlineView(syncMaster, outline)


    cmTaskpaper.title.text = 'CodeMirror View'
    panel.insertLeft(cmTaskpaper)
