       positions_array = d3.shuffle parent.children.concat parent
       parent_index = positions_array.indexOf parent
       parent_y = parent._text_object.position.y
-
+      # Set the array determining positons for this node and its children
       parent._positions_array = positions_array
 
       positions_array.forEach (node, index) =>

    @lines_object = lines_object

  start: (data) ->
    # Convert lines data to tree structure
    root = linesToTree data

    # Add empty Object3Ds
    root = @addObjects root

    # Position objects
    root = @positionObjects root

    @animateLines root
      .then =>
        @fadeAll @lines_object.children, 0, 2000
      .then =>
        @lines_object.remove.apply(@lines_object, @lines_object.children)

  ########################
  # ANIMATE LINES
  animateLines: (root) =>
    # Fade in the root

      current.children[prev_index] = prev
      prev._parent = current
      current
    return lines.reduceRight reducer

  sanitizeData = (data) ->
    return data.map (each) ->
      if each.sIdx is each.eIdx
        if each.line[each.sIdx] isnt ""
          each.word = each.line[each.sIdx]
          each.eIdx = each.sIdx + 1
        else
          console.error each, each.line[each.sIdx+1]
      console.assert each.sIdx isnt each.eIdx, each
      console.assert each.word isnt "", each
      return each
