   handle_any_object = (object) ->
     @object object
     true
+
+  # TODO make this configurable
+  result_handlers =[
+    ignored,
+    handle_cmd,
+    handle_renderable,
+    handle_using_extension
+    handle_any_object
+  ]
+
+  display_object = (ctx, object) ->
+    for handler in result_handlers
+      return if handler.call ctx, object
 
 
   collect_extension_points = (context, extension_point) ->

          o._lead_render = -> nested_context.apply_to fn
        o

      create_nested_renderable_context: ->
        component = component_list()
        @create_nested_context
          renderable_list_builder: component

      create_nested_context: (overrides) ->
        nested_context = _.extend create_new_run_context(@), overrides

      detached:  (fn, args) ->
        nested_context = @create_nested_renderable_context()
        nested_context.apply_to fn, args
        nested_context.renderable_list_builder

      # creates a nested context, adds it to the renderable list, and applies the function to it
      nested_item: (fn, args...) ->
        nested_context = @create_nested_renderable_context()
        @add_component nested_context.renderable_list_builder
        nested_context.apply_to fn, args

      display_object: (object) ->
        for handler in result_handlers
          return if handler.call @, object

      value: (value) -> _lead_context_fn_value: value


    else
      renderable_component {renderable}

  create_nested_renderable_context = (ctx) ->
    component = component_list()
    ctx.create_nested_context
      renderable_list_builder: component

  # creates a nested context, adds it to the renderable list, and applies the function to it
  nested_item = (ctx, fn, args...) ->
    nested_context = create_nested_renderable_context ctx
    ctx.add_component nested_context.renderable_list_builder
    nested_context.apply_to fn, args

  create_run_context = (extra_contexts) ->
    asyncs = new Bacon.Bus

    run_context_prototype = _.extend {}, extra_contexts...,
