Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs	(revision 5366)
@@ -135,11 +135,5 @@
     }
     private GeneticAlgorithmMainLoop GeneticAlgorithmMainLoop {
-      get {
-        return (GeneticAlgorithmMainLoop)(
-          (ResultsCollector)(
-            (SubScopesCounter)SolutionsCreator.Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(SolutionsCreator.Successor); }
     }
     [Storable]
@@ -375,4 +369,11 @@
       Analyzer.Operators.Add(qualityAnalyzer);
     }
+    private GeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is GeneticAlgorithmMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (GeneticAlgorithmMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs	(revision 5366)
@@ -187,13 +187,5 @@
     }
     private IslandGeneticAlgorithmMainLoop MainLoop {
-      get {
-        return (IslandGeneticAlgorithmMainLoop)(
-          (ResultsCollector)(
-            (UniformSubScopesProcessor)(
-              (VariableCreator)IslandProcessor.Successor
-            ).Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(IslandProcessor.Successor); }
     }
     [Storable]
@@ -506,4 +498,11 @@
       Analyzer.Operators.Add(qualityAnalyzer);
     }
+    private IslandGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is IslandGeneticAlgorithmMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (IslandGeneticAlgorithmMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs	(revision 5366)
@@ -118,11 +118,5 @@
     }
     private LocalSearchMainLoop MainLoop {
-      get {
-        return (LocalSearchMainLoop)(
-          (ResultsCollector)(
-            (VariableCreator)SolutionsCreator.Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(SolutionsCreator.Successor); }
     }
     [Storable]
@@ -396,4 +390,11 @@
       }
     }
+    private LocalSearchMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is LocalSearchMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (LocalSearchMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs	(revision 5366)
@@ -42,4 +42,6 @@
   [StorableClass]
   public class NSGA2 : EngineAlgorithm, IStorableContent {
+    public string Filename { get; set; }
+
     #region Problem Properties
     public override Type ProblemType {
@@ -143,9 +145,5 @@
     }
     private NSGA2MainLoop MainLoop {
-      get {
-        return (NSGA2MainLoop)(
-          (ResultsCollector)RankAndCrowdingSorter.Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(RankAndCrowdingSorter.Successor); }
     }
     #endregion
@@ -392,10 +390,12 @@
       Analyzer.Operators.Add(paretoFrontAnalyzer);
     }
+    private NSGA2MainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is NSGA2MainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (NSGA2MainLoop)mainLoop;
+    }
     #endregion
-
-    public string Filename {
-      get;
-      set;
-    }
   }
 }
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 5366)
@@ -239,13 +239,5 @@
     }
     private IslandOffspringSelectionGeneticAlgorithmMainLoop MainLoop {
-      get {
-        return (IslandOffspringSelectionGeneticAlgorithmMainLoop)(
-          (ResultsCollector)(
-            (UniformSubScopesProcessor)(
-              (VariableCreator)IslandProcessor.Successor
-            ).Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(IslandProcessor.Successor); }
     }
     [Storable]
@@ -625,4 +617,11 @@
       Analyzer.Operators.Add(selectionPressureAnalyzer);
     }
+    private IslandOffspringSelectionGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is IslandOffspringSelectionGeneticAlgorithmMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (IslandOffspringSelectionGeneticAlgorithmMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 5366)
@@ -191,11 +191,5 @@
     }
     private OffspringSelectionGeneticAlgorithmMainLoop MainLoop {
-      get {
-        return (OffspringSelectionGeneticAlgorithmMainLoop)(
-          (ResultsCollector)(
-            (SubScopesCounter)SolutionsCreator.Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(SolutionsCreator.Successor); }
     }
     [Storable]
@@ -469,4 +463,11 @@
       Analyzer.Operators.Add(selectionPressureAnalyzer);
     }
+    private OffspringSelectionGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is OffspringSelectionGeneticAlgorithmMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (OffspringSelectionGeneticAlgorithmMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 5366)
@@ -215,13 +215,5 @@
     }
     private SASEGASAMainLoop MainLoop {
-      get {
-        return (SASEGASAMainLoop)(
-          (ResultsCollector)(
-            (UniformSubScopesProcessor)(
-              (VariableCreator)VillageProcessor.Successor
-            ).Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(VillageProcessor.Successor); }
     }
     [Storable]
@@ -563,4 +555,11 @@
       Analyzer.Operators.Add(selectionPressureAnalyzer);
     }
+    private SASEGASAMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is SASEGASAMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (SASEGASAMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs	(revision 5366)
@@ -136,11 +136,5 @@
     }
     private SimulatedAnnealingMainLoop MainLoop {
-      get {
-        return (SimulatedAnnealingMainLoop)(
-          (ResultsCollector)(
-            (VariableCreator)SolutionsCreator.Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(SolutionsCreator.Successor); }
     }
     [Storable]
@@ -432,4 +426,11 @@
       Analyzer.Operators.Add(qualityAnalyzer);
     }
+    private SimulatedAnnealingMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is SimulatedAnnealingMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (SimulatedAnnealingMainLoop)mainLoop;
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs	(revision 5365)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs	(revision 5366)
@@ -135,11 +135,5 @@
     }
     private TabuSearchMainLoop MainLoop {
-      get {
-        return (TabuSearchMainLoop)(
-          (ResultsCollector)(
-            (VariableCreator)SolutionsCreator.Successor
-          ).Successor
-        ).Successor;
-      }
+      get { return FindMainLoop(SolutionsCreator.Successor); }
     }
     [Storable]
@@ -492,4 +486,11 @@
       }
     }
+    private TabuSearchMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is TabuSearchMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (TabuSearchMainLoop)mainLoop;
+    }
     #endregion
   }
