Index: /trunk/sources/HeuristicLab.DistributedEngine/HeuristicLab.DistributedEngine.csproj
===================================================================
--- /trunk/sources/HeuristicLab.DistributedEngine/HeuristicLab.DistributedEngine.csproj	(revision 26)
+++ /trunk/sources/HeuristicLab.DistributedEngine/HeuristicLab.DistributedEngine.csproj	(revision 27)
@@ -72,8 +72,4 @@
       <Name>HeuristicLab.PluginInfrastructure</Name>
     </ProjectReference>
-    <ProjectReference Include="..\HeuristicLab.ThreadParallelEngine\HeuristicLab.ThreadParallelEngine.csproj">
-      <Project>{6E757D0E-20F9-4E89-AF06-D7DA256870DB}</Project>
-      <Name>HeuristicLab.ThreadParallelEngine</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
Index: /trunk/sources/HeuristicLab.DistributedEngine/HeuristicLabDistributedEnginePlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.DistributedEngine/HeuristicLabDistributedEnginePlugin.cs	(revision 26)
+++ /trunk/sources/HeuristicLab.DistributedEngine/HeuristicLabDistributedEnginePlugin.cs	(revision 27)
@@ -30,5 +30,4 @@
   [Dependency(Dependency = "HeuristicLab.Core")]
   [Dependency(Dependency = "HeuristicLab.Grid")]
-  [Dependency(Dependency = "HeuristicLab.ThreadParallelEngine")]
   public class HeuristicLabDistributedEnginePlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.Grid/HeuristicLab.Grid.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Grid/HeuristicLab.Grid.csproj	(revision 26)
+++ /trunk/sources/HeuristicLab.Grid/HeuristicLab.Grid.csproj	(revision 27)
@@ -83,8 +83,4 @@
       <Name>HeuristicLab.PluginInfrastructure</Name>
     </ProjectReference>
-    <ProjectReference Include="..\HeuristicLab.ThreadParallelEngine\HeuristicLab.ThreadParallelEngine.csproj">
-      <Project>{6E757D0E-20F9-4E89-AF06-D7DA256870DB}</Project>
-      <Name>HeuristicLab.ThreadParallelEngine</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
Index: /trunk/sources/HeuristicLab.Grid/HeuristicLabGridPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Grid/HeuristicLabGridPlugin.cs	(revision 26)
+++ /trunk/sources/HeuristicLab.Grid/HeuristicLabGridPlugin.cs	(revision 27)
@@ -30,5 +30,4 @@
   [PluginFile(Filename = "HeuristicLab.Grid.dll", Filetype = PluginFileType.Assembly)]
   [Dependency(Dependency = "HeuristicLab.Core")]
-  [Dependency(Dependency = "HeuristicLab.ThreadParallelEngine")]
   public class HeuristicLabGridPlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.Grid/ProcessingEngine.cs
===================================================================
--- /trunk/sources/HeuristicLab.Grid/ProcessingEngine.cs	(revision 26)
+++ /trunk/sources/HeuristicLab.Grid/ProcessingEngine.cs	(revision 27)
@@ -26,8 +26,8 @@
 using HeuristicLab.Core;
 using System.Xml;
+using System.Threading;
 
 namespace HeuristicLab.Grid {
-  public class ProcessingEngine : ThreadParallelEngine.ThreadParallelEngine {
-
+  public class ProcessingEngine : EngineBase {
     private AtomicOperation initialOperation;
     public AtomicOperation InitialOperation {
@@ -56,4 +56,28 @@
       initialOperation = (AtomicOperation)PersistenceManager.Restore(node.SelectSingleNode("InitialOperation"), restoredObjects);
     }
+
+    protected override void ProcessNextOperation() {
+      IOperation operation = myExecutionStack.Pop();
+      if(operation is AtomicOperation) {
+        AtomicOperation atomicOperation = (AtomicOperation)operation;
+        IOperation next = null;
+        try {
+          next = atomicOperation.Operator.Execute(atomicOperation.Scope);
+        } catch(Exception ex) {
+          // push operation on stack again
+          myExecutionStack.Push(atomicOperation);
+          Abort();
+          ThreadPool.QueueUserWorkItem(delegate(object state) { OnExceptionOccurred(ex); });
+        }
+        if(next != null)
+          myExecutionStack.Push(next);
+        OnOperationExecuted(atomicOperation);
+        if(atomicOperation.Operator.Breakpoint) Abort();
+      } else if(operation is CompositeOperation) {
+        CompositeOperation compositeOperation = (CompositeOperation)operation;
+        for(int i = compositeOperation.Operations.Count - 1; i >= 0; i--)
+          myExecutionStack.Push(compositeOperation.Operations[i]);
+      }
+    }
   }
 }
