       newData = GE.applyPatches(patches, @data)
       return new Model(newData, @)
 
+  # Constants are modelData, assets, actions, and serviceData
+  NodeVisitorConstants: class NodeVisitorConstants
+    constructor: (@modelData, @serviceData, @assets, @actions) ->
+
+  NodeVisitorResult: class NodeVisitorResult
+    constructor: (@result = null, @modelPatches = [], @servicePatches = []) ->
+
+    # Return new results with combination of this and other
+    appendWith: (other) ->
+      # TODO: this is probably incorrect
+      newResult = result || other.result
+
+      newModelPatches = GE.concatenate(modelPatches, other.modelPatches)
+      newServicePatches = GE.concatenate(servicePatches, other.servicePatches)
+      return new NodeVisitorResult(newResult, newModelPatches, newServicePatches)
+
   signals: makeConstantSet("DONE", "ERROR")
 
   extensions:


    return makeNodeVisitorResult()

    # List of patches to apply, across all actions
    modelPatches = []
    servicePatches = {}
    result = undefined

      if layout.action not of actions then throw new Error("Cannot find action '#{layout.action}'")

      childNames = if layout.children? then [0..layout.children.length - 1] else []

      if "update" of actions[layout.action]
        [result, actionPatches] = GE.sandboxActionCall(model, assets, bindings, actions, layout.action, "update", layout.params, childNames)
        # Concatenate patches array in place
        patches.push(actionPatches...) 

      # check which children should be activated
      if "listActiveChildren" of actions[layout.action]
        [activeChildren, __] = GE.sandboxActionCall(model, assets, bindings, actions, layout.action, "listActiveChildren", layout.params, childNames)
      else
        # By default, all children are considered active
        activeChildren = childNames

      # Continue with children
      childSignals = []
      for childIndex in activeChildren
        child = layout.children[childIndex]
        [childSignals[childIndex], childPatches] = GE.runStep(model, assets, actions, child, bindings)
        # Concatenate patches array in place
        patches.push(childPatches...) 

      # Handle signals
      # TODO: if handler not defined, propogate error signals upwards? How to merge them?
      if "handleSignals" of actions[layout.action]
        [result, actionPatches] = GE.sandboxActionCall(model, assets, bindings, actions, layout.action, "handleSignals", layout.params, childNames, childSignals)
        # Concatenate patches array in place
        patches.push(actionPatches...) 
    else if "call" of layout
      GE.sandboxFunctionCall(model, assets, bindings, layout.call, layout.params, bindings)
    else if "bind" of layout
      bindingSet = GE.calculateBindingSet(model.data, assets, bindings, layout.bind)
      for newBindings in bindingSet
        # Continue with children
        for child in (layout.children or [])
          [__, childPatches] = GE.runStep(model, assets, actions, child, newBindings)
          # Concatenate patches array in place
          patches.push(childPatches...) 
    else if "setModel" of layout
      setModelPatches = GE.handleSetModel(model, assets, bindings, layout.setModel)
      # Concatenate the array in place
      patches.push(setModelPatches...) 
    else
      GE.logError("Layout item is not understood")

    return [result, patches]

  # Parameter names are always strings
  makeModelEvaluator: (modelData, name) -> 
    if not name? then throw new Error("Model evaluator requires a name")

    [parent, key] = GE.getParentAndKey(modelData, name.split("."))

      set: (x) -> parent[key] = x
    }

  makeAssetEvaluator: (constants, name) ->
    if not name? then throw new Error("Asset evaluator requires a name")

    return {
