         compileJavascript
         executeJavascript sandbox, show
       ]
-      (pipe tasks) input, (error, result) ->
-        if error
-          go error
-        else
-          tasks = map (pickResults sandbox.results[guid]), render
-          (iterate tasks) go
+      (pipe tasks) input, (error) ->
+        output.error error if error
+        output.end()
+
+    render.isCode = yes
+    render
 
 Flow.Renderers = (_, _sandbox) ->
   h1: -> Flow.HtmlTag _, 'h1'

Flow.DialogManager = (_) ->

Flow.HtmlTag = (_, level) ->
  isCode: no
  render: (input, go) ->
    output = 
      text: input.trim() or '(Untitled)'
      template: "flow-#{level}"
    go null, [ [ null , output ] ]

Flow.Markdown = (_) ->
  isCode: no
  render: (input, go) ->
    try
      output =
        html: marked input.trim() or '(No content)'
        template: 'flow-html'
      go null, [ [ null , output ] ]
    catch error
      go error

Flow.Raw = (_) ->
  isCode: no
  render: (input, go) ->
    output =
      text: input
      template: 'flow-raw'
    go null, [ [ null , output ] ]

objectToHtmlTable = (obj) ->
  if obj is undefined

  execute = (go) ->
    input = _input().trim()
    unless input
      return if go then go() else undefined 

    render = _render()
    _isBusy yes
    # Clear any existing outputs
    _outputs []
    _hasError no
    render input,
      data: (result) ->
        _outputs.push result
      error: (error) ->
        _hasError yes
        #XXX review
        if error.cause?
          _outputs.push
            error: error
            template: 'flow-error'
        else
          _outputs.push
            text: JSON.stringify error, null, 2
            template: 'flow-raw'
      end: ->
        _hasInput render.isCode
        _isBusy no
        go() if go

    _isActive no

