       @right = @module.nodes.get @get('right')
       if @get('gquery')
         @gquery = new Gquery({key: @get('gquery')})
+      # let the nodes know about me
       @left.right_links.push this
       @right.left_links.push this
 
+    # returns the absolute y coordinate of the left anchor point
+    #
     left_y:  =>
       offset = 0
       for link in @left.right_links
         # push down the first link
-        offset += link.height() / 2 if offset == 0
+        offset += link.value() / 2 if offset == 0
         break if link == this
-        offset += link.height()
+        offset += link.value()
       @left.y_offset() + offset
-    
+
+    # see above
+    #
     right_y:  =>
       offset = 0
       for link in @right.left_links
         # push down the first link
-        offset += link.height() / 2 if offset == 0
+        offset += link.value() / 2 if offset == 0
         break if link == this
-        offset += link.height()
+        offset += link.value()
       @right.y_offset() + offset
-    
+
     left_x:  => @left.x_center() + @module.Node.width / 2
-    
+
     right_x: => @right.x_center() - @module.Node.width / 2
 
+    # Use 4 points and let D3 interpolate a smooth curve
+    #
     path_points: =>
       [
           x: @left_x()

        attr("x", (d) => @x(@module.Node.horizontal_spacing * d.get('column') + 20)).
        attr("y", (d) => @y(100 * d.get ('row'))).
        attr("width", @x @module.Node.width).
        attr("height", (d) => @y d.height()).
        attr("stroke", "gray").
        attr("fill", (datum, i) -> colors(i))


      {id: 'transport',   column: 0, row: 5},
      {id: 'loss',        column: 0, row: 6},

      {id: 'el_prod',     column: 1, row: 1, label: "electricity production"},
      {id: 'heat_prod',   column: 1, row: 3, label: "heating production"},

      {id: 'coal',        column: 2, row: 0},
      {id: 'nuclear',     column: 2, row: 1},
      {id: 'gas',         column: 2, row: 2},
      {id: 'oil',         column: 2, row: 3},
      {id: 'biomass',     column: 2, row: 4},
      {id: 'wind',        column: 2, row: 5},
      {id: 'hydro',       column: 2, row: 6},
      {id: 'solar',       column: 2, row: 7},
      {id: 'waste',       column: 2, row: 8}

    ]
    links: [
      {left: 'industry',    right: 'el_prod',   gquery: 'electricity_industry_in_mekko_of_final_demand'},
      {left: 'other',       right: 'el_prod',   gquery: 'electricity_other_in_mekko_of_final_demand'},
      {left: 'households',  right: 'el_prod',   gquery: 'electricity_households_in_mekko_of_final_demand'},
      {left: 'agriculture', right: 'el_prod',   gquery: 'electricity_agriculture_in_mekko_of_final_demand'},
      {left: 'buildings',   right: 'el_prod',   gquery: 'electricity_buildings_in_mekko_of_final_demand'},
      {left: 'transport',   right: 'el_prod',   gquery: 'electricity_transport_in_mekko_of_final_demand'},
      {left: 'industry',    right: 'heat_prod', gquery: 'hot_water_industry_in_mekko_of_final_demand'},
      {left: 'other',       right: 'heat_prod', gquery: 'hot_water_other_in_mekko_of_final_demand'},
      {left: 'households',  right: 'heat_prod', gquery: 'hot_water_households_in_mekko_of_final_demand'},
      {left: 'agriculture', right: 'heat_prod', gquery: 'hot_water_agriculture_in_mekko_of_final_demand'},
      {left: 'buildings',   right: 'heat_prod', gquery: 'hot_water_buildings_in_mekko_of_final_demand'},
      {left: 'transport',   right: 'heat_prod', gquery: 'hot_water_transport_in_mekko_of_final_demand'},
      {left: 'el_prod',     right: 'coal',      gquery: 'coal_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'nuclear',   gquery: 'nuclear_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'gas',       gquery: 'gas_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'oil',       gquery: 'oil_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'biomass',   gquery: 'biomass_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'wind',      gquery: 'wind_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'hydro',     gquery: 'hydro_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'solar',     gquery: 'solar_in_source_of_electricity_production'},
      {left: 'el_prod',     right: 'waste',     gquery: 'waste_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'coal',      gquery: 'coal_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'nuclear',   gquery: 'nuclear_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'gas',       gquery: 'gas_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'oil',       gquery: 'oil_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'biomass',   gquery: 'biomass_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'wind',      gquery: 'wind_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'hydro',     gquery: 'hydro_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'solar',     gquery: 'solar_in_source_of_electricity_production'},
      {left: 'heat_prod',   right: 'waste',     gquery: 'waste_in_source_of_electricity_production'}
    ]

  # Helper classes
