 canvas.addEventListener 'mouseup', (e) ->
   t = Date.now()/1000
   pos = getCursorPosition(canvas, e)
+
+  # process collections, possibly replacing with conversions
   collections = (c.mouseup(pos, t) for c in collections)
+  
+  # filter out deleted (null) collections
   collections = (c for c in collections when c isnt null)
+
+  # construct new collections
+  while construct_queue.length > 0
+    c = construct_queue.shift()
+    collection = new c.const(shapes[next_shape])
+    next_shape = (next_shape + 1) % shapes.length
+    collection.setNodes(c.add_from, nextPos())
+    collections.push(collection)
+
+  # TODO: Each of these has subtly different semantics, and within the
+  # conversion mechanism there are a few variants as well, this should be2
+  # handled more cleanly

    ctx.fillText(@value, 0, 0)
    ctx.restore()
 
    @child0.render(ctx)
    @child1.render(ctx)

  forAll: (fn) ->
    @child0.forAll(fn)
    @child1.forAll(fn)
    fn(this)

  tryAll: (fn) ->
    result = @child0.tryAll(fn)
    if result?
      return result

    result = @child1.tryAll(fn)
    if result?
      return result

    fn(this)


  addAnimations: (anims) ->
    @animations = @animations.concat(anims)

  tidy: (tree, tree_pos) ->
    rel_pos = []

    calcBounds = (node) ->
