Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 10684)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 10685)
@@ -49,5 +49,5 @@
       this.lineColor = Color.Black;
       this.backgroundColor = Color.White;
-      this.textFont = new Font(FontFamily.GenericSansSerif, 12);
+      this.textFont = new Font(FontFamily.GenericSansSerif, 10);
 
       visualTreeNodes = new Dictionary<ISymbolicExpressionTreeNode, VisualTreeNode<ISymbolicExpressionTreeNode>>();
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeTile.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeTile.cs	(revision 10684)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeTile.cs	(revision 10685)
@@ -20,7 +20,9 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Drawing;
 using System.Linq;
+using HeuristicLab.Common;
 using HeuristicLab.Visualization;
 
@@ -35,4 +37,46 @@
     public double PreferredNodeWidth { get; set; }
     public double PreferredNodeHeight { get; set; }
+
+    public Size Size {
+      get {
+        int xmin = 0, ymin = 0, xmax = 0, ymax = 0;
+
+        foreach (var p in Primitives.OfType<RectangularPrimitiveBase>()) {
+          if (xmin > p.LowerLeft.X) xmin = (int)Math.Floor(p.LowerLeft.X);
+          if (xmax < p.UpperRight.X) xmax = (int)Math.Ceiling(p.UpperRight.X);
+          if (ymin > p.LowerLeft.Y) ymin = (int)Math.Floor(p.LowerLeft.Y);
+          if (ymax < p.UpperRight.Y) ymax = (int)Math.Ceiling(p.UpperRight.Y);
+        }
+
+        return new Size(xmax - xmin, ymax - ymin);
+      }
+    }
+
+    private Point position;
+    public Point Position {
+      get { return position; }
+      set {
+        var oldpos = position;
+        position = value;
+        int ox = position.X - oldpos.X;
+        int oy = position.Y - oldpos.Y;
+        // translate all primitives to the new position
+        foreach (var p in Primitives) {
+          var rpb = p as RectangularPrimitiveBase;
+          if (rpb != null) {
+            var lowerLeft = new Point((int)Math.Floor(rpb.LowerLeft.X) + ox, (int)Math.Floor(rpb.LowerLeft.Y + oy));
+            var upperRight = new PointD(lowerLeft.X + rpb.Size.Width, lowerLeft.Y + rpb.Size.Height);
+            rpb.SetPosition(lowerLeft, upperRight);
+          }
+          var line = p as LinearPrimitiveBase;
+          if (line != null) {
+            var start = new Point((int)Math.Floor(line.Start.X) + ox, (int)Math.Floor(line.Start.Y) + oy);
+            var end = new Point(start.X + (int)line.Size.Width, start.Y + (int)line.Size.Height);
+            line.SetPosition(start, end);
+          }
+        }
+      }
+    }
+
     private ISymbolicExpressionTree symbolicExpressionTree;
     public ISymbolicExpressionTree SymbolicExpressionTree {
@@ -63,11 +107,10 @@
       : base(chart) {
       primitiveMap = new Dictionary<IPrimitive, ISymbolicExpressionTreeNode>();
-
+      PreferredNodeWidth = 80;
+      PreferredNodeHeight = 40;
       Group = new Group(chart);
     }
     public SymbolicExpressionTreeTile(IChart chart, ISymbolicExpressionTree tree)
       : this(chart) {
-      PreferredNodeWidth = 80;
-      PreferredNodeHeight = 40;
       SymbolicExpressionTree = tree;
     }
@@ -95,4 +138,19 @@
         primitiveMap.Add(rectangularPrimitive, node); // to be able to retrieve nodes via primitives
         this.Add(rectangularPrimitive);
+
+        //        int x = Position.X, y = Position.Y;
+        //        if (x > rectangularPrimitive.LowerLeft.X) {
+        //          x = (int)Math.Floor(rectangularPrimitive.LowerLeft.X);
+        //        }
+        //        if (y > rectangularPrimitive.LowerLeft.Y) {
+        //          y = (int)Math.Floor(rectangularPrimitive.LowerLeft.Y);
+        //        }
+        //        Position = new Point(x, y);
+        //        int w = Size.Width, h = Size.Height;
+
+
+        if (rectangularPrimitive.Size.Width.IsAlmost(0) || rectangularPrimitive.Size.Height.IsAlmost(0)) {
+          throw new Exception("Primitive size cannot be zero.");
+        }
       }
 
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs	(revision 10684)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs	(revision 10685)
@@ -42,13 +42,9 @@
 
     public new IEnumerable<IGenealogyGraphArc> InArcs {
-      get {
-        return base.InArcs.Cast<IGenealogyGraphArc>().ToList();
-      }
+      get { return base.InArcs.Cast<IGenealogyGraphArc>().ToList(); }
       set { base.InArcs = value; }
     }
     public new IEnumerable<IGenealogyGraphArc> OutArcs {
-      get {
-        return base.OutArcs.Cast<IGenealogyGraphArc>().ToList();
-      }
+      get { return base.OutArcs.Cast<IGenealogyGraphArc>().ToList(); }
       set { base.InArcs = value; }
     }
@@ -111,5 +107,4 @@
       return Quality.CompareTo(other.Quality);
     }
-
     public new void AddForwardArc(IVertex target, double w = 0.0, object data = null) {
       var arc = new GenealogyGraphArc { Source = this, Target = (IGenealogyGraphNode)target, Data = data, Weight = w };
@@ -120,13 +115,9 @@
       base.AddReverseArc(arc);
     }
-
     public IEnumerable<IGenealogyGraphNode> Parents {
-      get {
-        return InArcs == null ? Enumerable.Empty<IGenealogyGraphNode>() : InArcs.Select(a => a.Source);
-      }
+      get { return InArcs.Select(a => a.Source); }
     }
-
     public IEnumerable<IGenealogyGraphNode> Children {
-      get { return OutArcs == null ? Enumerable.Empty<IGenealogyGraphNode>() : OutArcs.Select(a => a.Source); }
+      get { return OutArcs.Select(a => a.Target); }
     }
   }
@@ -147,21 +138,13 @@
       return new GenealogyGraphNode<T>(this, cloner);
     }
-
     public new IEnumerable<IGenealogyGraphNode<T>> Parents {
-      get {
-        return base.Parents.Select(p => (IGenealogyGraphNode<T>)p);
-      }
+      get { return base.Parents.Select(p => (IGenealogyGraphNode<T>)p); }
     }
-
     public new IEnumerable<IGenealogyGraphNode<T>> Children {
-      get {
-        return base.Children.Select(c => (IGenealogyGraphNode<T>)c);
-      }
+      get { return base.Children.Select(c => (IGenealogyGraphNode<T>)c); }
     }
-
     public new IEnumerable<IGenealogyGraphNode<T>> Ancestors {
       get { return base.Ancestors.Select(x => (IGenealogyGraphNode<T>)x); }
     }
-
     public new IEnumerable<IGenealogyGraphNode<T>> Descendants {
       get { return base.Descendants.Select(x => (IGenealogyGraphNode<T>)x); }
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/FragmentGraphView.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/FragmentGraphView.cs	(revision 10684)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/FragmentGraphView.cs	(revision 10685)
@@ -1,3 +1,4 @@
 ﻿using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
 using HeuristicLab.Core.Views;
@@ -11,4 +12,6 @@
   [Content(typeof(IGenealogyGraph<IFragment<ISymbolicExpressionTreeNode>>), IsDefaultView = true)]
   public sealed partial class FragmentGraphView : ItemView {
+    private int PreferredSpacing = 50;
+
     private ReingoldTilfordLayoutEngine<TileLayoutNode> layoutEngine;
     private ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> symbolicExpressionEngine;
@@ -38,17 +41,10 @@
         tile.LayoutEngine = symbolicExpressionEngine;
         tile.Root = node.Content.Root;
-        var tileNode = new TileLayoutNode {
-          Tile = tile
-        };
+        var tileNode = new TileLayoutNode { Tile = tile };
         tileDictionary.Add(node, tileNode);
       }
-
-
       foreach (var node in Content.Nodes.Where(n => n.Children.Any())) {
         var layoutNode = tileDictionary[node];
-        layoutNode.Children = new List<TileLayoutNode>();
-        foreach (var child in node.Children) {
-          layoutNode.Children.Add(tileDictionary[child]);
-        }
+        layoutNode.Children = new List<TileLayoutNode>(node.Children.Select(x => tileDictionary[x]));
       }
     }
@@ -63,4 +59,5 @@
       foreach (var visualNode in visualNodes) {
         var tile = visualNode.Content.Tile;
+        tile.Position = new Point(visualNode.X, visualNode.Y);
         symbolicExpressionChartControl.Add(tile);
       }
@@ -104,5 +101,10 @@
   internal class TileLayoutNode {
     public SymbolicExpressionTreeTile Tile { get; set; }
-    public List<TileLayoutNode> Children { get; set; }
+
+    private List<TileLayoutNode> children;
+    public IEnumerable<TileLayoutNode> Children {
+      get { return children ?? Enumerable.Empty<TileLayoutNode>(); }
+      set { children = value.ToList(); }
+    }
   }
 }
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymboldDataAnalysisGenealogyView.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymboldDataAnalysisGenealogyView.cs	(revision 10684)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymboldDataAnalysisGenealogyView.cs	(revision 10685)
@@ -34,5 +34,4 @@
 
 using FragmentGraph = HeuristicLab.EvolutionTracking.IGenealogyGraph<HeuristicLab.EvolutionTracking.IFragment<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTreeNode>>;
-
 using FragmentNode = HeuristicLab.EvolutionTracking.GenealogyGraphNode<HeuristicLab.EvolutionTracking.IFragment<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTreeNode>>;
 
@@ -102,14 +101,9 @@
         // perform fragment tracing
         var fragmentGraph = TraceSubtree(subtree);
-        MainFormManager.MainForm.ShowContent(fragmentGraph);
-        //        var fragmentGraphView = MainFormManager.MainForm.ShowContent(fragmentGraph);
-        //        fragmentGraphView.Content = fragmentGraph;
-        //        fragmentGraphView.Show();
-
-        // open a FragmentGraphView displaying this fragmentGraph
+        MainFormManager.MainForm.ShowContent(fragmentGraph); // display the fragment graph on the screen
       } else {
         // perform matching like it was done before
         // currently there is no possibility to specify the subtree matching criteria
-        var trees = Content.Nodes.Select(x => (ISymbolicExpressionTree)x.Content);
+        var trees = Content.Nodes.Select(x => x.Content);
         var matchingTrees = trees.Where(x => x.Root.ContainsSubtree(subtree, comparer));
 
@@ -167,8 +161,4 @@
 
     #region fragment tracing
-    #region helper methods to shorten the code
-
-    #endregion
-
     private FragmentGraph TraceSubtree(ISymbolicExpressionTreeNode subtree) {
       var graphNode = (IGenealogyGraphNode<ISymbolicExpressionTree>)genealogyGraphChart.SelectedGraphNode;
@@ -192,9 +182,13 @@
         var fragmentLength = fragment.Root.GetLength();
 
-        FragmentNode node = new FragmentNode { Content = new Fragment<ISymbolicExpressionTreeNode> { Root = subtree }, Rank = graphNode.Rank };
+        var fragmentNode = new FragmentNode { Content = new Fragment<ISymbolicExpressionTreeNode> { Root = subtree }, Rank = graphNode.Rank };
         if (parentNode != null) {
-          AddChild(parentNode, node);
-        }
-        fragmentGraph.AddVertex(node);
+          if (parentNode == fragmentNode)
+            throw new Exception("Node cannot be a child of itself!");
+          var arc = new GenealogyGraphArc { Source = parentNode, Target = fragmentNode };
+          parentNode.AddForwardArc(arc);
+        }
+        fragmentGraph.AddVertex(fragmentNode);
+        parentNode = fragmentNode;
 
         // if the selected subtree is the actual fragment
@@ -204,5 +198,4 @@
           tree = graphNode.Content;
           subtree = tree.NodeAt(fragment.OldIndex);
-          parentNode = node;
           continue;
         }
@@ -215,5 +208,4 @@
           var i = fragment.Root.IndexOf(subtree); // get the index of the selected subtree, relative to the fragment root
           subtree = tree.NodeAt(fragment.OldIndex + i);
-          parentNode = node;
           continue;
         }
@@ -226,5 +218,5 @@
           subtree = tree.NodeAt(subtreeIndex);
           // track subtree
-          Trace(graphNode, subtree, fragmentGraph, node);
+          Trace(graphNode, subtree, fragmentGraph, fragmentNode);
 
           // track fragment
@@ -233,5 +225,4 @@
             tree = graphNode.Content;
             subtree = tree.NodeAt(fragment.OldIndex);
-            parentNode = node;
             continue;
           }
@@ -241,15 +232,8 @@
           tree = graphNode.Content;
           subtree = tree.NodeAt(subtreeIndex);
-          parentNode = node;
           continue;
         }
         break;
       }
-    }
-
-    private void AddChild(FragmentNode parent, FragmentNode child) {
-      child.Rank = parent.Rank - 1;
-      parent.AddForwardArc(child);
-      child.AddReverseArc(parent);
     }
     #endregion
@@ -262,4 +246,11 @@
       return writer.ToString();
     }
+    #region some helper methods for shortening the tracing code
+
+    internal static void AddChild(this IGenealogyGraphNode parent, IGenealogyGraphNode child) {
+      parent.AddForwardArc(child);
+      child.AddReverseArc(parent);
+      child.Rank = parent.Rank - 1;
+    }
     internal static ISymbolicExpressionTreeNode NodeAt(this ISymbolicExpressionTree tree, int position) {
       return NodeAt(tree.Root, position);
@@ -272,6 +263,12 @@
     }
     internal static int IndexOf(this ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode node) {
-      return root.IterateNodesPrefix().ToList().IndexOf(node); // not too worried about efficiency here
-    }
+      int i = 0;
+      foreach (var n in root.IterateNodesPrefix()) {
+        if (n == node) return i;
+        ++i;
+      }
+      return -1;
+    }
+    #endregion
   }
 }
