     name: 'tidy',
     action: (c, t) ->
       console.log('tidy trees')
-      if c.nodes.length == 1
-        n = c.nodes[0]
+      for n in c.nodes
         c.tidy(n, (x: n.x, y: n.y))
-      else
-        console.log('not attempting to tidy multiple trees')
   },
   {
     name: 'Shannon-Fano',


    @addAnimations([new CollectionAnimation(anims, -1)])


class WeightedNodeCollection extends NodeCollection
  constructor: (shape) ->

    name: 'tidy',
    action: (c, t) ->
      console.log('tidy trees')
      for n in c.nodes
        c.tidy(n, (x: n.x, y: n.y))
  },
  {
    name: 'convert to code table'
    action: (c, t) ->
      console.log('convert to code table')
      if c.nodes.length != 1
        console.log('only can convert a single tree')
      else
        c.convertToCode()
  },
  {
    name: 'delete'
