Index: trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 797)
+++ trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 798)
@@ -61,4 +61,6 @@
     }
 
+    private ClientCommunicatorClient clientCommunicator;
+
     public void Start() {
       Heartbeat beat = new Heartbeat { Interval = 5000 };
@@ -67,10 +69,9 @@
       ClientInfo clientInfo = new ClientInfo { ClientId = Guid.NewGuid() };
 
-      ClientCommunicatorClient clientCommunicator = ServiceLocator.GetClientCommunicator();
+      clientCommunicator = ServiceLocator.GetClientCommunicator();
       clientCommunicator.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(ClientCommunicator_LoginCompleted);
       clientCommunicator.LoginAsync(clientInfo);
 
       MessageQueue queue = MessageQueue.GetInstance();
-      queue.AddMessage(MessageContainer.MessageType.FetchJob);
       while (true) {
         MessageContainer container = queue.GetMessage();
@@ -81,5 +82,5 @@
     }
 
-    void ClientCommunicator_LoginCompleted(object sender, LoginCompletedEventArgs e) {     
+    void ClientCommunicator_LoginCompleted(object sender, LoginCompletedEventArgs e) {
       if (e.Result.Success) {
         Logging.GetInstance().Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now);
@@ -115,5 +116,4 @@
           break;
 
-
         case MessageContainer.MessageType.RequestSnapshot:
           engines[container.JobId].RequestSnapshot();
@@ -125,17 +125,6 @@
 
         case MessageContainer.MessageType.FetchJob:
-          bool sandboxed = true;
-
-          IJob job = CreateNewJob();
-
-          AppDomain appDomain = CreateNewAppDomain(false);
-          appDomains.Add(job.JobId, appDomain);
-
-          Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
-          engine.Job = job;
-          engine.JobId = job.JobId;
-          engine.Queue = MessageQueue.GetInstance();
-          engine.Start();
-          engines.Add(engine.JobId, engine);
+          clientCommunicator.PullJobCompleted += new EventHandler<PullJobCompletedEventArgs>(ClientCommunicator_PullJobCompleted);
+          clientCommunicator.PullJobAsync(Guid.NewGuid());
           break;
 
@@ -145,7 +134,28 @@
           appDomains.Remove(container.JobId);
           engines.Remove(container.JobId);
+          Status.CurrentJobs--;
+          Debug.WriteLine("Decrement CurrentJobs to:"+Status.CurrentJobs.ToString());
           break;
+      }
+    }
 
-      }
+    void ClientCommunicator_PullJobCompleted(object sender, PullJobCompletedEventArgs e) {
+      bool sandboxed = false;
+
+      IJob job = new TestJob { JobId = e.Result.JobId };
+
+      AppDomain appDomain = CreateNewAppDomain(sandboxed);
+      appDomains.Add(job.JobId, appDomain);
+
+      Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
+      engine.Job = job;
+      engine.JobId = job.JobId;
+      engine.Queue = MessageQueue.GetInstance();
+      engine.Start();
+      engines.Add(engine.JobId, engine);
+
+      Status.CurrentJobs++;
+
+      Debug.WriteLine("Increment CurrentJobs to:"+Status.CurrentJobs.ToString());
     }
 
Index: trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs	(revision 797)
+++ trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs	(revision 798)
@@ -78,9 +78,6 @@
 
     void ClientCommunicator_SendHeartBeatCompleted(object sender, SendHeartBeatCompletedEventArgs e) {
-      System.Diagnostics.Debug.WriteLine("Heartbeat received! " + e.Result.ActionRequest.ToString());
-      foreach (MessageContainer mc in e.Result.ActionRequest) {
-        MessageQueue.GetInstance().AddMessage(mc);
-
-      }
+      System.Diagnostics.Debug.WriteLine("Heartbeat received! ");
+      e.Result.ActionRequest.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc));
     }
   }
