Index: /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
===================================================================
--- /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs	(revision 8555)
+++ /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs	(revision 8556)
@@ -32,20 +32,20 @@
 namespace HeuristicLab.EvolutionaryTracking.Views {
   public partial class GenealogyGraphChart : ChartControl {
-    private Dictionary<GenealogyGraphNode, List<VisualGenealogyGraphNode>> _visualNodeMap;
-    private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> _visualArcMap;
+    private Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode> visualNodeMap;
+    private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> visualArcMap;
     private const int Diameter = 20; // node diameter
     private int x, y; // coordinates for positioning each node
     private const int Cx = 30, Cy = 30; // position increments
-    private VisualGenealogyGraphNode _selectedGenealogyGraphNode;
-    public VisualGenealogyGraphNode SelectedGenealogyGraphNode { get { return _selectedGenealogyGraphNode; } }
-    private Visualization.Rectangle _targetRectangle; // provides a  rectangle mark of the currently selected genealogy graph node
-
-    private SymbolicExpressionTreeGenealogyGraph _graph;
+    private VisualGenealogyGraphNode selectedGenealogyGraphNode;
+    public VisualGenealogyGraphNode SelectedGenealogyGraphNode { get { return selectedGenealogyGraphNode; } }
+    private Visualization.Rectangle targetRectangle; // provides a  rectangle mark of the currently selected genealogy graph node
+
+    private SymbolicExpressionTreeGenealogyGraph graph;
     public SymbolicExpressionTreeGenealogyGraph Graph {
-      get { return _graph; }
+      get { return graph; }
       internal set {
-        _graph = value;
-        _visualNodeMap = new Dictionary<GenealogyGraphNode, List<VisualGenealogyGraphNode>>();
-        _visualArcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
+        graph = value;
+        visualNodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>();
+        visualArcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
         DrawGraph();
       }
@@ -65,35 +65,14 @@
 
     public void DrawGraph() {
-      if (_graph == null) return;
+      if (graph == null) return;
       Chart.UpdateEnabled = false;
 
-      var genealogyGraphNodes = Graph.Values.ToList();
-      var layers = genealogyGraphNodes.GroupBy(n => Graph[n].Ranks[0]).OrderBy(g => g.Key).Select(g => new { Rank = g.Key, Nodes = g.ToList() }).ToList();
-      List<GenealogyGraphNode> currentLayer = null;
-      List<GenealogyGraphNode> previousLayer = null;
-
-      for (int i = 0; i != layers.Count(); ++i) {
-        var layer = layers[i];
-        double currentRank = layer.Rank;
-        if (i > 0 && currentRank % 1 == 0) {
-          previousLayer = currentLayer;
-          currentLayer = layer.Nodes;
-          int d = previousLayer.Count - currentLayer.Count;
-          if (d > 0)
-            currentLayer.AddRange(previousLayer.Take(d));
-        } else {
-          currentLayer = layer.Nodes;
-        }
-        currentLayer.Sort((b, a) => {
-          if (Graph[a].Quality.Equals(Graph[b].Quality)) {
-            if (Graph[a].IsElite) return 1;
-            if (Graph[b].IsElite) return -1;
-          }
-          return Graph[a].Quality.CompareTo(Graph[b].Quality);
-        }); // sort descending by quality (using comparison defined in GenealogyGraphNode class)
-
+      var layers = Graph.Nodes.GroupBy(n => n.Ranks[0]).OrderBy(g => g.Key).Select(g => new { Rank = g.Key, Nodes = g.ToList() }).ToList();
+      for (int i = 0; i != layers.Count; ++i) {
+        // sort descending by quality (using comparison defined in GenealogyGraphNode class)
+        layers[i].Nodes.Sort((b, a) => Graph.Compare(a, b));
         x = 0; // reset horizontal coordinate
         // start laying out visual nodes
-        foreach (var node in currentLayer) {
+        foreach (var node in layers[i].Nodes) {
           var pen = new Pen(Color.LightGray);
           var nl = Environment.NewLine;
@@ -101,12 +80,11 @@
             Data = node,
             ToolTipText = "Id: " + node.Label + nl +
-                          "Ranks: " + string.Join(",", Graph[node].Ranks.Select(r => r.ToString())) + nl +
-                          "Quality: " + String.Format("{0:0.0000}", Graph[node].Quality) + nl +
-                          "IsElite: " + Graph[node].IsElite
+                          "Ranks: " + string.Join(",", node.Ranks) + nl +
+                          "Quality: " + String.Format("{0:0.0000}", node.Quality) + nl +
+                          "IsElite: " + node.IsElite
           };
           Chart.Group.Add(visualNode);
-          if (!_visualNodeMap.ContainsKey(node))
-            _visualNodeMap[node] = new List<VisualGenealogyGraphNode>();
-          _visualNodeMap[node].Add(visualNode);
+          if (!visualNodeMap.ContainsKey(node))
+            visualNodeMap[node] = visualNode;
 
           x += Cx; // increment horizontal coordinate
@@ -114,21 +92,27 @@
 
         y -= Cy; // decrement vertical coordinate (because the origin is upside down)
+
+        // connect elites from successive layers with visual arcs
+        if (i > 0) {
+          for (int m = 0; m != layers[i].Nodes.Count; ++m)
+            for (int n = 0; n != layers[i - 1].Nodes.Count; ++n) {
+              if (layers[i].Nodes[m].SymbolicExpressionTree == layers[i - 1].Nodes[n].SymbolicExpressionTree) {
+                var v1 = visualNodeMap[layers[i].Nodes[m]];
+                var v2 = visualNodeMap[layers[i - 1].Nodes[n]];
+                var pen = new Pen(Color.LightGray);
+                visualArcMap[Tuple.Create(v2, v1)] = AddArc(Chart, v2, v1, pen);
+              }
+            }
+        }
       }
       // add arcs separately (to avoid some ordering problems)
-      foreach (var node in _visualNodeMap.Keys) {
-        var visualNode = _visualNodeMap[node][0];
+      foreach (var node in visualNodeMap.Keys) {
+        var visualNode = visualNodeMap[node];
         if (node.InEdges == null) continue;
 
         foreach (var arc in node.InEdges) {
-          var visualParent = _visualNodeMap[arc.Target][0];
+          var visualParent = visualNodeMap[arc.Target];
           var pen = new Pen(Color.Transparent);
-          _visualArcMap[Tuple.Create(visualParent, visualNode)] = AddArc(Chart, visualParent, visualNode, pen);
-        }
-      }
-      // connect visual nodes representing the same elite individual with a line
-      foreach (var list in _visualNodeMap.Values.Where(l => l.Count > 1)) {
-        for (int i = 1; i != list.Count; ++i) {
-          var pen = new Pen(Color.LightGray);
-          _visualArcMap[Tuple.Create(list[i - 1], list[i])] = AddArc(Chart, list[i - 1], list[i], pen);
+          visualArcMap[Tuple.Create(visualParent, visualNode)] = AddArc(Chart, visualParent, visualNode, pen);
         }
       }
@@ -156,7 +140,7 @@
         var visualNodes = Chart.GetAllPrimitives(e.Location).Where(p => p is VisualGenealogyGraphNode).ToList();
         if (visualNodes.Count > 0) {
-          if (_selectedGenealogyGraphNode == visualNodes[0]) return;
-          _selectedGenealogyGraphNode = visualNodes[0] as VisualGenealogyGraphNode;
-          if (_selectedGenealogyGraphNode == null) return;
+          if (selectedGenealogyGraphNode == visualNodes[0]) return;
+          selectedGenealogyGraphNode = visualNodes[0] as VisualGenealogyGraphNode;
+          if (selectedGenealogyGraphNode == null) return;
           // new node has been selected, clean up
           Chart.UpdateEnabled = false;
@@ -164,61 +148,58 @@
           ClearAllNodes();
           // use a rectangle to highlight the currently selected genealogy graph node
-          var center = _selectedGenealogyGraphNode.Center;
-          var size = _selectedGenealogyGraphNode.Size;
+          var center = selectedGenealogyGraphNode.Center;
+          var size = selectedGenealogyGraphNode.Size;
           double x1 = center.X - size.Width / 2;
           double x2 = x1 + size.Width;
           double y1 = center.Y - size.Height / 2;
           double y2 = y1 + size.Height;
-          if (_targetRectangle == null) {
-            _targetRectangle = new Visualization.Rectangle(Chart, x1, y1, x2, y2, new Pen(Color.Black), null);
-            Chart.Group.Add(_targetRectangle);
+          if (targetRectangle == null) {
+            targetRectangle = new Visualization.Rectangle(Chart, x1, y1, x2, y2, new Pen(Color.Black), null);
+            Chart.Group.Add(targetRectangle);
           } else {
-            _targetRectangle.SetPosition(x1, y1, x2, y2);
-          }
-          var gNode = _selectedGenealogyGraphNode.Data; // genealogy graph node (representing an individual in the population) 
-          double rank = Graph[gNode].Ranks[0];
+            targetRectangle.SetPosition(x1, y1, x2, y2);
+          }
+          var gNode = selectedGenealogyGraphNode.Data; // genealogy graph node (representing an individual in the population) 
+          //          double rank = Graph[gNode].Ranks[0];
+          double rank = ((SymbolicExpressionGenealogyGraphNode)gNode).Ranks[0];
           // ancestors
-          var ancestors = gNode.Ancestors().Where(n => Graph[n].Ranks.Last() < rank).ToList();
+          var ancestors = gNode.Ancestors().Where(n => ((SymbolicExpressionGenealogyGraphNode)n).Ranks.Last() < rank).ToList();
           ancestors.Add(gNode);
           // descendants
-          var descendants = gNode.Descendants().Where(n => Graph[n].Ranks.Last() > rank).ToList();
+          var descendants = gNode.Descendants().Where(n => ((SymbolicExpressionGenealogyGraphNode)n).Ranks.Last() > rank).ToList();
           descendants.Add(gNode);
           // highlight ancestors
-          foreach (var node in ancestors.Select(n => _visualNodeMap[n][0])) {
-            node.Brush = new SolidBrush(Graph[node.Data].GetColor());
+          foreach (var node in ancestors.Select(n => visualNodeMap[n])) {
+            node.Brush = new SolidBrush(((SymbolicExpressionGenealogyGraphNode)node.Data).GetColor());
             if (node.IncomingArcs != null)
               foreach (var arc in node.IncomingArcs) {
-                // check if, in case of elites, the target node is the first visual representation of the elite
-                // (for purposes of display consistency)
-                bool isFirst = arc.Source == _visualNodeMap[arc.Source.Data][0];
-                if (arc.Source.Data == arc.Target.Data || !isFirst) continue;
                 var start = new Point((int)arc.Start.X, (int)arc.Start.Y);
                 var end = new Point((int)arc.End.X, (int)arc.End.Y);
-                arc.Pen.Brush = new LinearGradientBrush(start, end, Graph[arc.Source.Data].GetColor(), Graph[arc.Target.Data].GetColor());
+                var srcNode = arc.Source.Data as SymbolicExpressionGenealogyGraphNode;
+                var destNode = arc.Target.Data as SymbolicExpressionGenealogyGraphNode;
+                arc.Pen.Brush = new LinearGradientBrush(start, end, srcNode.GetColor(), destNode.GetColor());
               }
           }
           // highlight descendants
-          foreach (var node in descendants.Select(n => _visualNodeMap[n][0])) {
-            node.Brush = new SolidBrush(Graph[node.Data].GetColor());
+          foreach (var node in descendants.Select(n => visualNodeMap[n])) {
+            node.Brush = new SolidBrush((node.Data as SymbolicExpressionGenealogyGraphNode).GetColor());
             if (node.OutgoingArcs != null)
               foreach (var arc in node.OutgoingArcs) {
-                // check if, in case of elites, the target node is the first visual representation of the elite
-                // (for purposes of display consistency)
-                bool isFirst = arc.Target == _visualNodeMap[arc.Target.Data][0];
-                if (arc.Source.Data == arc.Target.Data || !isFirst) continue;
                 var start = new Point((int)arc.Start.X, (int)arc.Start.Y);
                 var end = new Point((int)arc.End.X, (int)arc.End.Y);
-                arc.Pen.Brush = new LinearGradientBrush(start, end, Graph[arc.Source.Data].GetColor(), Graph[arc.Target.Data].GetColor());
+                var srcNode = arc.Source.Data as SymbolicExpressionGenealogyGraphNode;
+                var destNode = arc.Target.Data as SymbolicExpressionGenealogyGraphNode;
+                arc.Pen.Brush = new LinearGradientBrush(start, end, srcNode.GetColor(), destNode.GetColor());
               }
           }
         } else {
-          _selectedGenealogyGraphNode = null;
+          selectedGenealogyGraphNode = null;
         }
         // update
         Chart.UpdateEnabled = true;
         Chart.EnforceUpdate();
-        if (_selectedGenealogyGraphNode != null)
+        if (selectedGenealogyGraphNode != null)
           /* emit clicked event */
-          OnGenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e);
+          OnGenealogyGraphNodeClicked(selectedGenealogyGraphNode, e);
       }
     }
@@ -226,9 +207,15 @@
     public void ClearAllNodes() {
       foreach (var primitive in Chart.Group.Primitives) {
-        primitive.Brush = null;
         if (primitive is VisualGenealogyGraphArc) {
           var arc = primitive as VisualGenealogyGraphArc;
-          if (arc.Source.Data != arc.Target.Data && primitive.Pen.Brush != null)
+          var sourceData = (arc.Source.Data as SymbolicExpressionGenealogyGraphNode).SymbolicExpressionTree;
+          var targetData = (arc.Target.Data as SymbolicExpressionGenealogyGraphNode).SymbolicExpressionTree;
+          if (sourceData != targetData) {
             primitive.Pen.Brush = new SolidBrush(Color.Transparent);
+          } else {
+            primitive.Pen.Brush = new SolidBrush(Color.LightGray);
+          }
+        } else {
+          primitive.Brush = null;
         }
       }
@@ -236,19 +223,31 @@
 
     public void HighlightLineage(IEnumerable<GenealogyGraphNode> nodes) {
-      foreach (var node in nodes.SelectMany(n => _visualNodeMap[n])) {
-        node.Brush = new SolidBrush(Graph[node.Data].GetColor());
-        if (node.IncomingArcs == null || node != _visualNodeMap[node.Data][0]) continue;
+      foreach (var node in nodes.Select(n => visualNodeMap[n])) {
+        node.Brush = new SolidBrush((node.Data as SymbolicExpressionGenealogyGraphNode).GetColor());
+        if (node.IncomingArcs == null || node != visualNodeMap[node.Data]) continue;
         foreach (var arc in node.IncomingArcs) {
           if (arc.Source.Data == node.Data) continue;
           var start = new Point((int)arc.Start.X, (int)arc.Start.Y);
           var end = new Point((int)arc.End.X, (int)arc.End.Y);
-          arc.Pen.Brush = new LinearGradientBrush(start, end, Graph[arc.Source.Data].GetColor(), Graph[arc.Target.Data].GetColor());
-        }
-      }
-    }
-
+          var srcNode = arc.Source.Data as SymbolicExpressionGenealogyGraphNode;
+          var destNode = arc.Target.Data as SymbolicExpressionGenealogyGraphNode;
+          arc.Pen.Brush = new LinearGradientBrush(start, end, srcNode.GetColor(), destNode.GetColor());
+        }
+      }
+    }
+
+    // TODO: optimize and reduce complexity of this method
     public void HighlightNodes(IEnumerable<ISymbolicExpressionTree> trees, Color color) {
-      foreach (var visualNode in trees.Select(tree => _visualNodeMap[Graph.GetNode(tree)]).SelectMany(vList => vList))
-        visualNode.Brush = new SolidBrush(color);
+      foreach (var tree in trees)
+        foreach (var graphNode in Graph.Nodes) {
+          if (graphNode.SymbolicExpressionTree == tree) {
+            var visualNode = visualNodeMap[graphNode];
+            visualNode.Brush = new SolidBrush(color);
+          }
+        }
+    }
+
+    public void HighlightNode(SymbolicExpressionGenealogyGraphNode graphNode, Color color) {
+      visualNodeMap[graphNode].Brush = new SolidBrush(color);
     }
 
@@ -256,11 +255,11 @@
       Chart.UpdateEnabled = false;
       ClearAllNodes();
-      var graphNodes = Graph.Values.ToList();
-      double min = graphNodes.Min(x => x.InEdges == null ? 0 : x.InEdges.Count);
-      double max = graphNodes.Max(x => x.InEdges == null ? 0 : x.InEdges.Count);
-      foreach (var graphNode in graphNodes) {
-        var visualNode = _visualNodeMap[graphNode][0];
+      double max = Graph.Nodes.Max(x => x.InEdges == null ? 0 : x.InEdges.Count);
+      foreach (var graphNode in Graph.Nodes) {
+        var visualNode = visualNodeMap[graphNode];
         double deg = graphNode.InEdges == null ? 0 : graphNode.InEdges.Count;
-        var color = Color.FromArgb((int)(1 - deg / max) * 255, (int)(deg / max * 255), 100);
+        int index = (int)(deg / max * ColorGradient.Colors.Count);
+        if (index == ColorGradient.Colors.Count) --index;
+        var color = ColorGradient.Colors[index];
         visualNode.Brush = new SolidBrush(color);
       }
@@ -272,13 +271,13 @@
       Chart.UpdateEnabled = false;
       ClearAllNodes();
-      var graphNodes = Graph.Values.ToList();
-      double min = graphNodes.Min(x => x.OutEdges == null ? 0 : x.OutEdges.Count);
+      var graphNodes = Graph.Nodes;
       double max = graphNodes.Max(x => x.OutEdges == null ? 0 : x.OutEdges.Count);
       foreach (var graphNode in graphNodes) {
-        var visualNode = _visualNodeMap[graphNode][0];
+        var visualNode = visualNodeMap[graphNode];
         double deg = graphNode.OutEdges == null ? 0 : graphNode.OutEdges.Count;
-        int index = (int)(deg / max * ColorGradient.Colors.Count) - 1;
-        if (index < 0) index = 0;
-        visualNode.Brush = new SolidBrush(ColorGradient.Colors[index]);
+        int index = (int)(deg / max * ColorGradient.Colors.Count);
+        if (index == ColorGradient.Colors.Count) --index;
+        var color = ColorGradient.Colors[index];
+        visualNode.Brush = new SolidBrush(color);
       }
       Chart.UpdateEnabled = true;
@@ -288,6 +287,6 @@
 
   internal static class Util {
-    public static Color GetColor(this NodeMetadata nm) {
-      var colorIndex = (int)(nm.Quality * ColorGradient.Colors.Count);
+    public static Color GetColor(this SymbolicExpressionGenealogyGraphNode node) {
+      var colorIndex = (int)(node.Quality * ColorGradient.Colors.Count);
       if (colorIndex >= ColorGradient.Colors.Count) --colorIndex;
       return ColorGradient.Colors[colorIndex];
Index: /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.Designer.cs
===================================================================
--- /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.Designer.cs	(revision 8555)
+++ /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.Designer.cs	(revision 8556)
@@ -28,15 +28,13 @@
       this.splitContainer = new System.Windows.Forms.SplitContainer();
       this.genealogyTableLayout = new System.Windows.Forms.TableLayoutPanel();
+      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
+      this.topControlBox = new System.Windows.Forms.GroupBox();
       this.graphControlsPanel = new System.Windows.Forms.Panel();
+      this.similarityModeLabel = new System.Windows.Forms.Label();
+      this.similarityModeSelector = new System.Windows.Forms.ComboBox();
       this.selectModeButton = new System.Windows.Forms.RadioButton();
       this.moveModeButton = new System.Windows.Forms.RadioButton();
       this.zoomModeButton = new System.Windows.Forms.RadioButton();
-      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
-      this.topControlBox = new System.Windows.Forms.GroupBox();
-      this.similarityModeLabel = new System.Windows.Forms.Label();
-      this.similarityModeSelector = new System.Windows.Forms.ComboBox();
       this.genealogyGraphChart = new HeuristicLab.EvolutionaryTracking.Views.GenealogyGraphChart();
-      this.inDegreeButton = new System.Windows.Forms.Button();
-      this.outDegreeButton = new System.Windows.Forms.Button();
       this.mainTableLayout.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
@@ -45,6 +43,6 @@
       this.splitContainer.SuspendLayout();
       this.genealogyTableLayout.SuspendLayout();
+      this.topControlBox.SuspendLayout();
       this.graphControlsPanel.SuspendLayout();
-      this.topControlBox.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -62,5 +60,5 @@
       this.mainTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
       this.mainTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
-      this.mainTableLayout.Size = new System.Drawing.Size(528, 443);
+      this.mainTableLayout.Size = new System.Drawing.Size(787, 584);
       this.mainTableLayout.TabIndex = 6;
       // 
@@ -81,6 +79,6 @@
       this.splitContainer.Panel2.Controls.Add(this.symbolicExpressionTreeChart);
       this.splitContainer.Panel2MinSize = 50;
-      this.splitContainer.Size = new System.Drawing.Size(522, 387);
-      this.splitContainer.SplitterDistance = 241;
+      this.splitContainer.Size = new System.Drawing.Size(781, 528);
+      this.splitContainer.SplitterDistance = 360;
       this.splitContainer.TabIndex = 7;
       // 
@@ -90,5 +88,4 @@
       this.genealogyTableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
       this.genealogyTableLayout.Controls.Add(this.genealogyGraphChart, 0, 1);
-      this.genealogyTableLayout.Controls.Add(this.graphControlsPanel, 0, 0);
       this.genealogyTableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
       this.genealogyTableLayout.Location = new System.Drawing.Point(0, 0);
@@ -97,57 +94,6 @@
       this.genealogyTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle());
       this.genealogyTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
-      this.genealogyTableLayout.Size = new System.Drawing.Size(239, 385);
+      this.genealogyTableLayout.Size = new System.Drawing.Size(358, 526);
       this.genealogyTableLayout.TabIndex = 4;
-      // 
-      // graphControlsPanel
-      // 
-      this.graphControlsPanel.Controls.Add(this.outDegreeButton);
-      this.graphControlsPanel.Controls.Add(this.inDegreeButton);
-      this.graphControlsPanel.Controls.Add(this.selectModeButton);
-      this.graphControlsPanel.Controls.Add(this.moveModeButton);
-      this.graphControlsPanel.Controls.Add(this.zoomModeButton);
-      this.graphControlsPanel.Location = new System.Drawing.Point(3, 3);
-      this.graphControlsPanel.Name = "graphControlsPanel";
-      this.graphControlsPanel.Size = new System.Drawing.Size(194, 30);
-      this.graphControlsPanel.TabIndex = 0;
-      // 
-      // selectModeButton
-      // 
-      this.selectModeButton.Appearance = System.Windows.Forms.Appearance.Button;
-      this.selectModeButton.AutoSize = true;
-      this.selectModeButton.Location = new System.Drawing.Point(65, 3);
-      this.selectModeButton.Name = "selectModeButton";
-      this.selectModeButton.Size = new System.Drawing.Size(24, 23);
-      this.selectModeButton.TabIndex = 5;
-      this.selectModeButton.TabStop = true;
-      this.selectModeButton.Text = "S";
-      this.selectModeButton.UseVisualStyleBackColor = true;
-      this.selectModeButton.CheckedChanged += new System.EventHandler(this.selectModeButton_CheckedChanged);
-      // 
-      // moveModeButton
-      // 
-      this.moveModeButton.Appearance = System.Windows.Forms.Appearance.Button;
-      this.moveModeButton.AutoSize = true;
-      this.moveModeButton.Location = new System.Drawing.Point(3, 3);
-      this.moveModeButton.Name = "moveModeButton";
-      this.moveModeButton.Size = new System.Drawing.Size(26, 23);
-      this.moveModeButton.TabIndex = 3;
-      this.moveModeButton.TabStop = true;
-      this.moveModeButton.Text = "M";
-      this.moveModeButton.UseVisualStyleBackColor = true;
-      this.moveModeButton.CheckedChanged += new System.EventHandler(this.moveModeButton_CheckedChanged);
-      // 
-      // zoomModeButton
-      // 
-      this.zoomModeButton.Appearance = System.Windows.Forms.Appearance.Button;
-      this.zoomModeButton.AutoSize = true;
-      this.zoomModeButton.Location = new System.Drawing.Point(35, 3);
-      this.zoomModeButton.Name = "zoomModeButton";
-      this.zoomModeButton.Size = new System.Drawing.Size(24, 23);
-      this.zoomModeButton.TabIndex = 4;
-      this.zoomModeButton.TabStop = true;
-      this.zoomModeButton.Text = "Z";
-      this.zoomModeButton.UseVisualStyleBackColor = true;
-      this.zoomModeButton.CheckedChanged += new System.EventHandler(this.zoomModeButton_CheckedChanged);
       // 
       // symbolicExpressionTreeChart
@@ -158,5 +104,5 @@
       this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0);
       this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart";
-      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(275, 385);
+      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(415, 526);
       this.symbolicExpressionTreeChart.Spacing = 5;
       this.symbolicExpressionTreeChart.SuspendRepaint = false;
@@ -167,4 +113,5 @@
       // topControlBox
       // 
+      this.topControlBox.Controls.Add(this.graphControlsPanel);
       this.topControlBox.Controls.Add(this.similarityModeLabel);
       this.topControlBox.Controls.Add(this.similarityModeSelector);
@@ -172,8 +119,18 @@
       this.topControlBox.Location = new System.Drawing.Point(3, 3);
       this.topControlBox.Name = "topControlBox";
-      this.topControlBox.Size = new System.Drawing.Size(522, 44);
+      this.topControlBox.Size = new System.Drawing.Size(781, 44);
       this.topControlBox.TabIndex = 6;
       this.topControlBox.TabStop = false;
       this.topControlBox.Text = "Controls";
+      // 
+      // graphControlsPanel
+      // 
+      this.graphControlsPanel.Controls.Add(this.selectModeButton);
+      this.graphControlsPanel.Controls.Add(this.moveModeButton);
+      this.graphControlsPanel.Controls.Add(this.zoomModeButton);
+      this.graphControlsPanel.Location = new System.Drawing.Point(246, 14);
+      this.graphControlsPanel.Name = "graphControlsPanel";
+      this.graphControlsPanel.Size = new System.Drawing.Size(93, 30);
+      this.graphControlsPanel.TabIndex = 2;
       // 
       // similarityModeLabel
@@ -199,37 +156,46 @@
       this.similarityModeSelector.SelectedIndexChanged += new System.EventHandler(this.similarityModeSelector_SelectedIndexChanged);
       // 
+      // selectModeButton
+      // 
+      this.selectModeButton.Appearance = System.Windows.Forms.Appearance.Button;
+      this.selectModeButton.Location = new System.Drawing.Point(63, 3);
+      this.selectModeButton.Name = "selectModeButton";
+      this.selectModeButton.Size = new System.Drawing.Size(24, 24);
+      this.selectModeButton.TabIndex = 11;
+      this.selectModeButton.TabStop = true;
+      this.selectModeButton.UseVisualStyleBackColor = true;
+      this.selectModeButton.CheckedChanged += new System.EventHandler(this.selectModeButton_CheckedChanged);
+      // 
+      // moveModeButton
+      // 
+      this.moveModeButton.Appearance = System.Windows.Forms.Appearance.Button;
+      this.moveModeButton.Location = new System.Drawing.Point(3, 3);
+      this.moveModeButton.Name = "moveModeButton";
+      this.moveModeButton.Size = new System.Drawing.Size(24, 24);
+      this.moveModeButton.TabIndex = 9;
+      this.moveModeButton.TabStop = true;
+      this.moveModeButton.UseVisualStyleBackColor = true;
+      this.moveModeButton.CheckedChanged += new System.EventHandler(this.moveModeButton_CheckedChanged);
+      // 
+      // zoomModeButton
+      // 
+      this.zoomModeButton.Appearance = System.Windows.Forms.Appearance.Button;
+      this.zoomModeButton.Location = new System.Drawing.Point(33, 3);
+      this.zoomModeButton.Name = "zoomModeButton";
+      this.zoomModeButton.Size = new System.Drawing.Size(24, 24);
+      this.zoomModeButton.TabIndex = 10;
+      this.zoomModeButton.TabStop = true;
+      this.zoomModeButton.UseVisualStyleBackColor = true;
+      this.zoomModeButton.CheckedChanged += new System.EventHandler(this.zoomModeButton_CheckedChanged);
+      // 
       // genealogyGraphChart
       // 
       this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control;
       this.genealogyGraphChart.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.genealogyGraphChart.Location = new System.Drawing.Point(3, 39);
+      this.genealogyGraphChart.Location = new System.Drawing.Point(3, 3);
       this.genealogyGraphChart.Name = "genealogyGraphChart";
       this.genealogyGraphChart.ScaleOnResize = true;
-      this.genealogyGraphChart.Size = new System.Drawing.Size(233, 343);
+      this.genealogyGraphChart.Size = new System.Drawing.Size(352, 520);
       this.genealogyGraphChart.TabIndex = 2;
-      // 
-      // inDegreeButton
-      // 
-      this.inDegreeButton.AutoSize = true;
-      this.inDegreeButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-      this.inDegreeButton.Location = new System.Drawing.Point(95, 3);
-      this.inDegreeButton.Name = "inDegreeButton";
-      this.inDegreeButton.Size = new System.Drawing.Size(28, 23);
-      this.inDegreeButton.TabIndex = 6;
-      this.inDegreeButton.Text = "IN";
-      this.inDegreeButton.UseVisualStyleBackColor = true;
-      this.inDegreeButton.Click += new System.EventHandler(this.inDegreeButton_Click);
-      // 
-      // outDegreeButton
-      // 
-      this.outDegreeButton.AutoSize = true;
-      this.outDegreeButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-      this.outDegreeButton.Location = new System.Drawing.Point(129, 3);
-      this.outDegreeButton.Name = "outDegreeButton";
-      this.outDegreeButton.Size = new System.Drawing.Size(40, 23);
-      this.outDegreeButton.TabIndex = 7;
-      this.outDegreeButton.Text = "OUT";
-      this.outDegreeButton.UseVisualStyleBackColor = true;
-      this.outDegreeButton.Click += new System.EventHandler(this.outDegreeButton_Click);
       // 
       // GenealogyGraphView
@@ -239,5 +205,5 @@
       this.Controls.Add(this.mainTableLayout);
       this.Name = "GenealogyGraphView";
-      this.Size = new System.Drawing.Size(528, 443);
+      this.Size = new System.Drawing.Size(787, 584);
       this.mainTableLayout.ResumeLayout(false);
       this.splitContainer.Panel1.ResumeLayout(false);
@@ -246,8 +212,7 @@
       this.splitContainer.ResumeLayout(false);
       this.genealogyTableLayout.ResumeLayout(false);
-      this.graphControlsPanel.ResumeLayout(false);
-      this.graphControlsPanel.PerformLayout();
       this.topControlBox.ResumeLayout(false);
       this.topControlBox.PerformLayout();
+      this.graphControlsPanel.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -268,6 +233,4 @@
     private System.Windows.Forms.RadioButton moveModeButton;
     private System.Windows.Forms.RadioButton zoomModeButton;
-    private System.Windows.Forms.Button inDegreeButton;
-    private System.Windows.Forms.Button outDegreeButton;
 
   }
Index: /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.cs
===================================================================
--- /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.cs	(revision 8555)
+++ /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.cs	(revision 8556)
@@ -36,6 +36,5 @@
   [Content(typeof(SymbolicExpressionTreeGenealogyGraph), IsDefaultView = true)]
   public sealed partial class GenealogyGraphView : ItemView {
-    private VisualSymbolicExpressionTreeNode _selectedVisualSymbolicExpressionTreeNode;
-
+    private VisualSymbolicExpressionTreeNode selectedVisualSymbExprTreeNode;
     public new SymbolicExpressionTreeGenealogyGraph Content {
       get { return (SymbolicExpressionTreeGenealogyGraph)base.Content; }
@@ -43,7 +42,15 @@
     }
 
+    private Dictionary<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode> clonedNodeMap;
+
     public GenealogyGraphView()
       : base() {
       InitializeComponent();
+      // set button icons here because if set in the designer file, they get overwritten
+      this.moveModeButton.Image = Common.Resources.VSImageLibrary.Pointer;
+      this.zoomModeButton.Image = Common.Resources.VSImageLibrary.Zoom;
+      this.selectModeButton.Image = Common.Resources.VSImageLibrary.Object;
+
+
       similarityModeSelector.SelectedIndex = 0; // set default similarity mode to "exact"
     }
@@ -61,4 +68,5 @@
       genealogyGraphChart.GenealogyGraphNodeClicked += graphChart_GenealogyGraphNodeClicked;
       symbolicExpressionTreeChart.SymbolicExpressionTreeNodeClicked += treeChart_SymbolicExpressionTreeNodeClicked;
+      symbolicExpressionTreeChart.SymbolicExpressionTreeNodeDoubleClicked += treeChart_SymbolicExpressionTreeNodeDoubleClicked;
     }
 
@@ -71,6 +79,6 @@
       else {
         genealogyGraphChart.Graph = Content;
-        var best = Content.Values.OrderByDescending(x => genealogyGraphChart.Graph[x].Quality).First();
-        symbolicExpressionTreeChart.Tree = (ISymbolicExpressionTree)best.Data;
+        var best = Content.Nodes.OrderByDescending(x => x.Quality).First();
+        symbolicExpressionTreeChart.Tree = best.SymbolicExpressionTree;
       }
     }
@@ -91,35 +99,49 @@
       // the type hierarchy goes like this: VisualGenealogyGraphNode --> GenealogyGraphNode --> symbolicExpressionTree
       var visualGenealogyGraphNode = (VisualGenealogyGraphNode)sender;
-      var genealogyGraphNode = (GenealogyGraphNode)visualGenealogyGraphNode.Data;
-      symbolicExpressionTreeChart.Tree = (ISymbolicExpressionTree)genealogyGraphNode.Data;
+      var genealogyGraphNode = (SymbolicExpressionGenealogyGraphNode)visualGenealogyGraphNode.Data;
+      symbolicExpressionTreeChart.Tree = genealogyGraphNode.SymbolicExpressionTree;
       // highlight the relevant fragment in the symbolic expression tree
-      if (_selectedVisualSymbolicExpressionTreeNode != null) {
+      selectedVisualSymbExprTreeNode = null;
+
+      bool repaint = false;
+
+      // paint highlighted nodes in symbolic expression tree
+      if (selectedVisualSymbExprTreeNode != null) {
+        // clear selected subtree from the tree chart
         var nodes = symbolicExpressionTreeChart.Tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;
-        var fragments = _selectedVisualSymbolicExpressionTreeNode.SymbolicExpressionTreeNode.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;
-        int index = SymbolicExpressionTreeMatching.FindMatch(nodes, fragments, similarityModeSelector.SelectedIndex);
+        var fragments = selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;
+        var similarityLevel = Enum.GetNames(typeof(SimilarityLevel))[similarityModeSelector.SelectedIndex];
+        int index = SymbolicExpressionTreeMatching.FindMatch(nodes, fragments, (SimilarityLevel)Enum.Parse(typeof(SimilarityLevel), similarityLevel));
         if (index != -1) {
-          _selectedVisualSymbolicExpressionTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(nodes[index]);
-          var subtree = _selectedVisualSymbolicExpressionTreeNode.SymbolicExpressionTreeNode;
-          foreach (var visualNode in subtree.IterateNodesBreadth().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node))) {
-            visualNode.FillColor = Color.LightBlue;
-          }
-          symbolicExpressionTreeChart.Repaint();
+          selectedVisualSymbExprTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(nodes[index]);
+          var subtree = selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode;
+          foreach (var node in subtree.IterateNodesBreadth()) {
+            var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
+            visualNode.LineColor = Color.Blue;
+          }
+          repaint = true;
         }
       }
+      // paint graph nodes
       var tree = symbolicExpressionTreeChart.Tree;
-      var graphNode = Content.GetNode(tree);
-      if (graphNode.InEdges != null) {
-        var arc = graphNode.InEdges.Find(a => a.Data != null);
-        if (arc != null) {
-          var fragment = arc.Data as ISymbolicExpressionTreeNode;
-          foreach (var node in fragment.IterateNodesBreadth()) {
-            var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
-            if (visualNode == null)
-              continue;
-            visualNode.FillColor = Color.LightGreen;
-          }
-          symbolicExpressionTreeChart.Repaint();
-        }
-      }
+      var graphNodes = Content.Nodes.Where(n => n.SymbolicExpressionTree == tree).ToList();
+      if (graphNodes.Count > 0) {
+        foreach (var graphNode in graphNodes)
+          if (graphNode != null && graphNode.InEdges != null) {
+            var arc = graphNode.InEdges.Find(a => a.Data != null);
+            if (arc != null) {
+              var fragment = arc.Data as ISymbolicExpressionTreeNode;
+              foreach (var node in fragment.IterateNodesBreadth()) {
+                var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
+                if (visualNode == null)
+                  continue;
+                visualNode.LineColor = Color.Orange;
+              }
+            }
+            repaint = true;
+          }
+      }
+      if (repaint)
+        symbolicExpressionTreeChart.Repaint();
     }
 
@@ -140,46 +162,95 @@
 
     private void treeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
-      _selectedVisualSymbolicExpressionTreeNode = (VisualSymbolicExpressionTreeNode)sender;
-      // find out which individuals in the genealogy graph contain this specific subtree
-      var treeNode = _selectedVisualSymbolicExpressionTreeNode.SymbolicExpressionTreeNode;
+      ISymbolicExpressionTreeNode selectedSubtree = null;
+      genealogyGraphChart.Chart.UpdateEnabled = false;
+      switch (e.Button) {
+        case MouseButtons.Left: {
+            selectedVisualSymbExprTreeNode = (VisualSymbolicExpressionTreeNode)sender;
+            if (selectedVisualSymbExprTreeNode == null) return;
+            // find out which individuals in the genealogy graph contain this specific subtree
+            selectedSubtree = selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode;
+            // clone every node in the selected subtree so that edit operations are possible without altering the original subtree
+            // save the originalNode-->clone mapping to make it easier to work with subtrees
+            if (clonedNodeMap == null)
+              clonedNodeMap = new Dictionary<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>();
+            clonedNodeMap.Clear();
+            var selectedSubtreeClone = selectedSubtree.Clone() as SymbolicExpressionTreeNode;
+            var subtreeNodes = selectedSubtree.IterateNodesPostfix().ToList();
+            var cloneNodes = selectedSubtreeClone.IterateNodesPostfix().ToList();
+            for (int i = 0; i != subtreeNodes.Count; ++i)
+              clonedNodeMap.Add(subtreeNodes[i], cloneNodes[i]);
+            // highlight subtree nodes in the tree chart
+            foreach (var node in symbolicExpressionTreeChart.Tree.IterateNodesPostfix()) {
+              var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
+              visualNode.FillColor = Color.Transparent;
+            }
+            selectedSubtree.ForEachNodePostfix(node => {
+              symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node).FillColor = Color.LightBlue;
+            });
+          }
+          break;
+        case MouseButtons.Middle: {
+            var visualNode = (VisualSymbolicExpressionTreeNode)sender;
+            if (selectedVisualSymbExprTreeNode == null || selectedVisualSymbExprTreeNode == visualNode)
+              return;
+            selectedSubtree = clonedNodeMap[selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode];
+            var selectedNode = visualNode.SymbolicExpressionTreeNode;
+            if (clonedNodeMap.ContainsKey(selectedNode)) {
+              var selected = clonedNodeMap[selectedNode];
+              var parent = selected.Parent;
+              parent.RemoveSubtree(parent.IndexOfSubtree(selected));
+              selectedNode.ForEachNodePostfix(node => {
+                symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node).FillColor = Color.Transparent;
+                clonedNodeMap.Remove(node);
+              });
+            }
+          }
+          break;
+      }
+      // update visual graph nodes that contain matching trees
       Color[] colors = { Color.LightSkyBlue, Color.PaleGreen, Color.Tan };
-      // update visual graph nodes
-      genealogyGraphChart.Chart.UpdateEnabled = false;
       genealogyGraphChart.ClearAllNodes(); // clear node colors
-      // color each graph node according to the degree to which it matches the selected tree fragment
-      foreach (var i in Enum.GetValues(typeof(SymbolicExpressionTreeMatching.SimilarityLevel)).Cast<int>().Reverse()) {
-        var owners = genealogyGraphChart.Graph.TraceFragment(treeNode, i).ToList();
-        if (owners.Any()) genealogyGraphChart.HighlightNodes(owners, colors[i]); // highlight matching individuals from the genealogy
+      // color each graph node according to the degree to which it matches the selected tree fragment 
+      var similarityValues = Enum.GetValues(typeof(SimilarityLevel)).Cast<SimilarityLevel>().ToList();
+      foreach (var graphNode in genealogyGraphChart.Graph.Nodes) {
+        var tree = graphNode.SymbolicExpressionTree;
+        for (int i = 0; i != similarityValues.Count; ++i) {
+          if (tree.ContainsFragment(selectedSubtree, similarityValues[i])) {
+            genealogyGraphChart.HighlightNode(graphNode, colors[i]);
+            break;
+          }
+        }
       }
       genealogyGraphChart.Chart.UpdateEnabled = true;
       genealogyGraphChart.Chart.EnforceUpdate();
-
-      // highlight subtree nodes in the tree chart
-      foreach (var visualNode in symbolicExpressionTreeChart.Tree.IterateNodesPostfix().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node)))
-        visualNode.FillColor = Color.Transparent;
-
-      foreach (var visualNode in treeNode.IterateNodesPostfix().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node)))
-        visualNode.FillColor = Color.LightBlue;
-
       // refresh the tree chart
       symbolicExpressionTreeChart.Repaint();
     }
 
+    private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
+    }
+
     private void similarityModeSelector_SelectedIndexChanged(object sender, EventArgs e) {
-      if (_selectedVisualSymbolicExpressionTreeNode == null) return;
-      var treeNode = _selectedVisualSymbolicExpressionTreeNode.SymbolicExpressionTreeNode;
-      var owners = genealogyGraphChart.Graph.TraceFragment(treeNode, similarityModeSelector.SelectedIndex).ToList();
+      if (selectedVisualSymbExprTreeNode == null) return;
+      var treeNode = selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode;
+      var similarityLevel = Enum.GetNames(typeof(SimilarityLevel))[similarityModeSelector.SelectedIndex];
+      var owners = genealogyGraphChart.Graph.TraceFragment(treeNode, (SimilarityLevel)Enum.Parse(typeof(SimilarityLevel), similarityLevel)).ToList();
       if (owners.Any()) {
         genealogyGraphChart.Chart.UpdateEnabled = false;
         genealogyGraphChart.ClearAllNodes(); // clear the fill color of all nodes
-        genealogyGraphChart.HighlightNodes(owners, Color.LightSkyBlue); // highlight matching individuals from the genealogy
+        genealogyGraphChart.HighlightNodes(owners, Color.LightSkyBlue);
+        // highlight matching individuals from the genealogy
         genealogyGraphChart.Chart.UpdateEnabled = true;
       }
       genealogyGraphChart.Chart.EnforceUpdate();
       // highlight subtree nodes in the tree chart
-      foreach (var visualNode in symbolicExpressionTreeChart.Tree.IterateNodesPostfix().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node)))
+      foreach (var node in symbolicExpressionTreeChart.Tree.IterateNodesPostfix()) {
+        var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
         visualNode.FillColor = Color.Transparent;
-      foreach (var visualNode in treeNode.IterateNodesPostfix().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node)))
+      }
+      foreach (var node in treeNode.IterateNodesPostfix()) {
+        var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node);
         visualNode.FillColor = Color.LightBlue;
+      }
     }
     #endregion
Index: /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/HeuristicLab.EvolutionaryTracking.Views-3.4.csproj
===================================================================
--- /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/HeuristicLab.EvolutionaryTracking.Views-3.4.csproj	(revision 8555)
+++ /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/HeuristicLab.EvolutionaryTracking.Views-3.4.csproj	(revision 8556)
@@ -41,4 +41,5 @@
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     <Reference Include="HeuristicLab.Core-3.3">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
Index: /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs
===================================================================
--- /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs	(revision 8555)
+++ /branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs	(revision 8556)
@@ -27,5 +27,5 @@
 namespace HeuristicLab.EvolutionaryTracking.Views {
   public class VisualGenealogyGraphNode : Ellipse {
-    public GenealogyGraphNode Data { get; internal set; }
+    public IGenealogyGraphNode Data { get; internal set; }
     private List<VisualGenealogyGraphArc> _incomingArcs = new List<VisualGenealogyGraphArc>();
     private List<VisualGenealogyGraphArc> _outgoingArgs = new List<VisualGenealogyGraphArc>();
@@ -74,4 +74,15 @@
       get { return new PointD((LowerLeft.X + UpperRight.X) / 2, (LowerLeft.Y + UpperRight.Y) / 2); }
     }
+
+    public override void Draw(Graphics graphics) {
+      Point p = Chart.TransformWorldToPixel(new PointD(LowerLeft.X, LowerLeft.Y + Size.Height));
+      Size s = Chart.TransformWorldToPixel(Size);
+      if (Brush != null)
+        graphics.FillEllipse(Brush, p.X, p.Y, s.Width, s.Height);
+      graphics.DrawEllipse(Pen, p.X, p.Y, s.Width, s.Height);
+      if (((SymbolicExpressionGenealogyGraphNode)Data).IsElite) {
+        graphics.DrawEllipse(Pen, p.X + 2, p.Y + 2, s.Width - 4, s.Height - 4);
+      }
+    }
   }
 }
