Index: /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.Designer.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.Designer.cs	(revision 7132)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.235
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -62,5 +62,5 @@
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("HeuristicLab.Clients.Hive.SlaveCore.WindowsService")]
+        [global::System.Configuration.DefaultSettingValueAttribute("HeuristicLab.Clients.Hive.Slave")]
         public string ServiceName {
             get {
Index: /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.settings
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.settings	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.settings	(revision 7132)
@@ -13,5 +13,5 @@
     </Setting>
     <Setting Name="ServiceName" Type="System.String" Scope="User">
-      <Value Profile="(Default)">HeuristicLab.Clients.Hive.SlaveCore.WindowsService</Value>
+      <Value Profile="(Default)">HeuristicLab.Clients.Hive.Slave</Value>
     </Setting>
   </Settings>
Index: /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/app.config
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/app.config	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/app.config	(revision 7132)
@@ -17,4 +17,7 @@
                 <value>SlaveCommunicationServiceEndpoint</value>
             </setting>
+            <setting name="ServiceName" serializeAs="String">
+                <value>HeuristicLab.Clients.Hive.Slave</value>
+            </setting>
         </HeuristicLab.Clients.Hive.SlaveCore.Views.Properties.Settings>
     </userSettings>
Index: /trunk/sources/HeuristicLab.Clients.Hive.Slave/3.3/WcfService.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Slave/3.3/WcfService.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Slave/3.3/WcfService.cs	(revision 7132)
@@ -42,6 +42,6 @@
         if (instance == null) {
           instance = new WcfService();
-          ServiceLocator.Instance.Username = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlaveUser;
-          ServiceLocator.Instance.Password = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlavePwd;
+          HiveServiceLocator.Instance.Username = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlaveUser;
+          HiveServiceLocator.Instance.Password = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlavePwd;
         }
         return instance;
@@ -161,5 +161,5 @@
     public void CallHiveService(Action<IHiveService> call) {
       try {
-        ServiceLocator.Instance.CallHiveService(call);
+        HiveServiceLocator.Instance.CallHiveService(call);
       }
       catch (Exception ex) {
@@ -170,5 +170,5 @@
     private T CallHiveService<T>(Func<IHiveService, T> call) {
       try {
-        return ServiceLocator.Instance.CallHiveService(call);
+        return HiveServiceLocator.Instance.CallHiveService(call);
       }
       catch (Exception ex) {
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/ConcurrentTaskDownloader.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/ConcurrentTaskDownloader.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/ConcurrentTaskDownloader.cs	(revision 7132)
@@ -69,5 +69,5 @@
 
     private Task DownloadTask(object taskId) {
-      return ServiceLocator.Instance.CallHiveService(s => s.GetTask((Guid)taskId));
+      return HiveServiceLocator.Instance.CallHiveService(s => s.GetTask((Guid)taskId));
     }
 
@@ -81,5 +81,5 @@
       try {
         if (abort) return null;
-        result = ServiceLocator.Instance.CallHiveService(s => s.GetTaskData(task.Id));
+        result = HiveServiceLocator.Instance.CallHiveService(s => s.GetTaskData(task.Id));
       } finally {
         downloadSemaphore.Release();
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/HeuristicLab.Clients.Hive-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/HeuristicLab.Clients.Hive-3.3.csproj	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/HeuristicLab.Clients.Hive-3.3.csproj	(revision 7132)
@@ -116,5 +116,5 @@
     </Compile>
     <Compile Include="Exceptions\ResourceNotFoundException.cs" />
-    <Compile Include="IServiceLocator.cs" />
+    <Compile Include="IHiveServiceLocator.cs" />
     <Compile Include="Tasks\EngineTask.cs" />
     <Compile Include="Tasks\OptimizerTask.cs" />
@@ -149,5 +149,5 @@
     <Compile Include="ServiceClients\HiveServiceClient.cs" />
     <Compile Include="ServiceClients\Task.cs" />
-    <Compile Include="ServiceLocator.cs" />
+    <Compile Include="HiveServiceLocator.cs" />
     <None Include="HeuristicLab.snk" />
     <None Include="ServiceClients\GenerateServiceClients.cmd" />
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveAdminClient.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveAdminClient.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveAdminClient.cs	(revision 7132)
@@ -79,5 +79,5 @@
         resources = new ItemList<Resource>();
 
-        ServiceLocator.Instance.CallHiveService(service => {
+        HiveServiceLocator.Instance.CallHiveService(service => {
           service.GetSlaveGroups().ForEach(g => resources.Add(g));
           service.GetSlaves().ForEach(s => resources.Add(s));
@@ -101,5 +101,5 @@
           downtimes = new ItemList<Downtime>();
 
-          ServiceLocator.Instance.CallHiveService(service => {
+          HiveServiceLocator.Instance.CallHiveService(service => {
             service.GetDowntimesForResource(downtimeForResourceId).ForEach(d => downtimes.Add(d));
           });
@@ -119,21 +119,21 @@
       if (item.Id == Guid.Empty) {
         if (item is SlaveGroup) {
-          item.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddSlaveGroup((SlaveGroup)item));
+          item.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddSlaveGroup((SlaveGroup)item));
         }
         if (item is Slave) {
-          item.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddSlave((Slave)item));
+          item.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddSlave((Slave)item));
         }
         if (item is Downtime) {
-          item.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddDowntime((Downtime)item));
+          item.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddDowntime((Downtime)item));
         }
       } else {
         if (item is SlaveGroup) {
-          ServiceLocator.Instance.CallHiveService((s) => s.UpdateSlaveGroup((SlaveGroup)item));
+          HiveServiceLocator.Instance.CallHiveService((s) => s.UpdateSlaveGroup((SlaveGroup)item));
         }
         if (item is Slave) {
-          ServiceLocator.Instance.CallHiveService((s) => s.UpdateSlave((Slave)item));
+          HiveServiceLocator.Instance.CallHiveService((s) => s.UpdateSlave((Slave)item));
         }
         if (item is Downtime) {
-          ServiceLocator.Instance.CallHiveService((s) => s.UpdateDowntime((Downtime)item));
+          HiveServiceLocator.Instance.CallHiveService((s) => s.UpdateDowntime((Downtime)item));
         }
       }
@@ -144,9 +144,9 @@
     public static void Delete(IHiveItem item) {
       if (item is SlaveGroup) {
-        ServiceLocator.Instance.CallHiveService((s) => s.DeleteSlaveGroup(item.Id));
+        HiveServiceLocator.Instance.CallHiveService((s) => s.DeleteSlaveGroup(item.Id));
       } else if (item is Slave) {
-        ServiceLocator.Instance.CallHiveService((s) => s.DeleteSlave(item.Id));
+        HiveServiceLocator.Instance.CallHiveService((s) => s.DeleteSlave(item.Id));
       } else if (item is Downtime) {
-        ServiceLocator.Instance.CallHiveService((s) => s.DeleteDowntime(item.Id));
+        HiveServiceLocator.Instance.CallHiveService((s) => s.DeleteDowntime(item.Id));
       }
     }
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs	(revision 7132)
@@ -82,9 +82,9 @@
 
       try {
-        this.IsAllowedPrivileged = ServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());
+        this.IsAllowedPrivileged = HiveServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());
 
         var oldJobs = jobs ?? new ItemCollection<RefreshableJob>();
         jobs = new HiveItemCollection<RefreshableJob>();
-        var jobsLoaded = ServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());
+        var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());
 
         foreach (var j in jobsLoaded) {
@@ -142,13 +142,13 @@
         if (item is JobPermission) {
           var hep = (JobPermission)item;
-          hep.GrantedUserId = ServiceLocator.Instance.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName));
+          hep.GrantedUserId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName));
           if (hep.GrantedUserId == Guid.Empty) {
             throw new ArgumentException(string.Format("The user {0} was not found.", hep.GrantedUserName));
           }
-          ServiceLocator.Instance.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission));
+          HiveServiceLocator.Instance.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission));
         }
       } else {
         if (item is Job)
-          ServiceLocator.Instance.CallHiveService(s => s.UpdateJob((Job)item));
+          HiveServiceLocator.Instance.CallHiveService(s => s.UpdateJob((Job)item));
       }
     }
@@ -176,10 +176,10 @@
 
       if (item is Job)
-        ServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));
+        HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));
       if (item is RefreshableJob)
-        ServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));
+        HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(item.Id));
       if (item is JobPermission) {
         var hep = (JobPermission)item;
-        ServiceLocator.Instance.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId));
+        HiveServiceLocator.Instance.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId));
       }
       item.Id = Guid.Empty;
@@ -215,5 +215,5 @@
 
     public static void PauseJob(RefreshableJob refreshableJob) {
-      ServiceLocator.Instance.CallHiveService(service => {
+      HiveServiceLocator.Instance.CallHiveService(service => {
         foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) {
           if (task.Task.State != TaskState.Finished && task.Task.State != TaskState.Aborted && task.Task.State != TaskState.Failed)
@@ -225,5 +225,5 @@
 
     public static void StopJob(RefreshableJob refreshableJob) {
-      ServiceLocator.Instance.CallHiveService(service => {
+      HiveServiceLocator.Instance.CallHiveService(service => {
         foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) {
           if (task.Task.State != TaskState.Finished && task.Task.State != TaskState.Aborted && task.Task.State != TaskState.Failed)
@@ -246,5 +246,5 @@
         var resourceIds = new List<Guid>();
         foreach (var resourceName in resourceNames) {
-          Guid resourceId = ServiceLocator.Instance.CallHiveService((s) => s.GetResourceId(resourceName));
+          Guid resourceId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetResourceId(resourceName));
           if (resourceId == Guid.Empty) {
             throw new ResourceNotFoundException(string.Format("Could not find the resource '{0}'", resourceName));
@@ -259,7 +259,7 @@
         // upload Job
         refreshableJob.Progress.Status = "Uploading Job...";
-        refreshableJob.Job.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddJob(refreshableJob.Job));
+        refreshableJob.Job.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddJob(refreshableJob.Job));
         bool isPrivileged = refreshableJob.Job.IsPrivileged;
-        refreshableJob.Job = ServiceLocator.Instance.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions
+        refreshableJob.Job = HiveServiceLocator.Instance.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions
         refreshableJob.Job.IsPrivileged = isPrivileged;
         cancellationToken.ThrowIfCancellationRequested();
@@ -271,7 +271,7 @@
         // upload plugins
         refreshableJob.Progress.Status = "Uploading plugins...";
-        this.OnlinePlugins = ServiceLocator.Instance.CallHiveService((s) => s.GetPlugins());
+        this.OnlinePlugins = HiveServiceLocator.Instance.CallHiveService((s) => s.GetPlugins());
         this.AlreadyUploadedPlugins = new List<Plugin>();
-        Plugin configFilePlugin = ServiceLocator.Instance.CallHiveService((s) => UploadConfigurationFile(s, onlinePlugins));
+        Plugin configFilePlugin = HiveServiceLocator.Instance.CallHiveService((s) => UploadConfigurationFile(s, onlinePlugins));
         this.alreadyUploadedPlugins.Add(configFilePlugin);
         cancellationToken.ThrowIfCancellationRequested();
@@ -357,5 +357,5 @@
           if (!cancellationToken.IsCancellationRequested) {
             lock (pluginLocker) {
-              ServiceLocator.Instance.CallHiveService((s) => hiveTask.Task.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins));
+              HiveServiceLocator.Instance.CallHiveService((s) => hiveTask.Task.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins));
             }
           }
@@ -370,7 +370,7 @@
           if (!cancellationToken.IsCancellationRequested) {
             if (parentHiveTask != null) {
-              hiveTask.Task.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData));
+              hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData));
             } else {
-              hiveTask.Task.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList()));
+              hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList()));
             }
           }
@@ -417,5 +417,5 @@
         // fetch all task objects to create the full tree of tree of HiveTask objects
         refreshableJob.Progress.Status = "Downloading list of tasks...";
-        allTasks = ServiceLocator.Instance.CallHiveService(s => s.GetLightweightJobTasks(hiveExperiment.Id));
+        allTasks = HiveServiceLocator.Instance.CallHiveService(s => s.GetLightweightJobTasks(hiveExperiment.Id));
         totalJobCount = allTasks.Count();
 
@@ -480,5 +480,5 @@
 
     public static ItemTask LoadItemJob(Guid jobId) {
-      TaskData taskData = ServiceLocator.Instance.CallHiveService(s => s.GetTaskData(jobId));
+      TaskData taskData = HiveServiceLocator.Instance.CallHiveService(s => s.GetTaskData(jobId));
       try {
         return PersistenceUtil.Deserialize<ItemTask>(taskData.Data);
@@ -505,5 +505,5 @@
 
     public static HiveItemCollection<JobPermission> GetJobPermissions(Guid jobId) {
-      return ServiceLocator.Instance.CallHiveService((service) => {
+      return HiveServiceLocator.Instance.CallHiveService((service) => {
         IEnumerable<JobPermission> jps = service.GetJobPermissions(jobId);
         foreach (var hep in jps) {
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs	(revision 7132)
@@ -456,10 +456,10 @@
         try {
           foreach (var child in childHiveTasks) {
-            ServiceLocator.Instance.CallHiveService(s => s.PauseTask(child.task.Id));
+            HiveServiceLocator.Instance.CallHiveService(s => s.PauseTask(child.task.Id));
           }
         }
         finally { childHiveTasksLock.ExitReadLock(); }
       } else {
-        ServiceLocator.Instance.CallHiveService(s => s.PauseTask(this.task.Id));
+        HiveServiceLocator.Instance.CallHiveService(s => s.PauseTask(this.task.Id));
       }
     }
@@ -470,15 +470,15 @@
         try {
           foreach (var child in childHiveTasks) {
-            ServiceLocator.Instance.CallHiveService(s => s.StopTask(child.task.Id));
+            HiveServiceLocator.Instance.CallHiveService(s => s.StopTask(child.task.Id));
           }
         }
         finally { childHiveTasksLock.ExitReadLock(); }
       } else {
-        ServiceLocator.Instance.CallHiveService(s => s.StopTask(this.task.Id));
+        HiveServiceLocator.Instance.CallHiveService(s => s.StopTask(this.task.Id));
       }
     }
 
     public void Restart() {
-      ServiceLocator.Instance.CallHiveService(service => {
+      HiveServiceLocator.Instance.CallHiveService(service => {
         TaskData taskData = new TaskData();
         taskData.TaskId = this.task.Id;
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveServiceLocator.cs	(revision 7132)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveServiceLocator.cs	(revision 7132)
@@ -0,0 +1,92 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Clients.Common;
+
+namespace HeuristicLab.Clients.Hive {
+  public class HiveServiceLocator : IHiveServiceLocator {
+    private static IHiveServiceLocator instance = null;
+    public static IHiveServiceLocator Instance {
+      get {
+        if (instance == null) {
+          instance = new HiveServiceLocator();
+        }
+        return instance;
+      }
+      set {
+        instance = value;
+      }
+    }
+
+    private string username;
+    public string Username {
+      get { return username; }
+      set { username = value; }
+    }
+
+    private string password;
+    public string Password {
+      get { return password; }
+      set { password = value; }
+    }
+
+    private HiveServiceClient NewServiceClient() {
+      HiveServiceClient cl;
+      if (string.IsNullOrEmpty(username) && string.IsNullOrEmpty(password))
+        cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>();
+      else
+        cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>(null, null, username, password);
+      
+      return cl;
+    }
+
+    public T CallHiveService<T>(Func<IHiveService, T> call) {
+      HiveServiceClient client = NewServiceClient();
+      try {
+        return call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+
+    public void CallHiveService(Action<IHiveService> call) {
+      HiveServiceClient client = NewServiceClient();
+      try {
+        call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/IHiveServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/IHiveServiceLocator.cs	(revision 7132)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/IHiveServiceLocator.cs	(revision 7132)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+
+namespace HeuristicLab.Clients.Hive {
+  public interface IHiveServiceLocator {
+    string Username { get; set; }
+    string Password { get; set; }
+    void CallHiveService(Action<IHiveService> call);
+    T CallHiveService<T>(Func<IHiveService, T> call);
+  }
+}
Index: unk/sources/HeuristicLab.Clients.Hive/3.3/IServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/IServiceLocator.cs	(revision 7131)
+++ 	(revision )
@@ -1,31 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-
-namespace HeuristicLab.Clients.Hive {
-  public interface IServiceLocator {
-    string Username { get; set; }
-    string Password { get; set; }
-    void CallHiveService(Action<IHiveService> call);
-    T CallHiveService<T>(Func<IHiveService, T> call);
-  }
-}
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/JobResultPoller.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/JobResultPoller.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/JobResultPoller.cs	(revision 7132)
@@ -106,5 +106,5 @@
 
     public IEnumerable<LightweightTask> FetchJobResults() {
-      return ServiceLocator.Instance.CallHiveService(service => {
+      return HiveServiceLocator.Instance.CallHiveService(service => {
         var responses = new List<LightweightTask>();
         responses.AddRange(service.GetLightweightJobTasks(jobId));
Index: unk/sources/HeuristicLab.Clients.Hive/3.3/ServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceLocator.cs	(revision 7131)
+++ 	(revision )
@@ -1,92 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Clients.Common;
-
-namespace HeuristicLab.Clients.Hive {
-  public class ServiceLocator : IServiceLocator {
-    private static IServiceLocator instance = null;
-    public static IServiceLocator Instance {
-      get {
-        if (instance == null) {
-          instance = new ServiceLocator();
-        }
-        return instance;
-      }
-      set {
-        instance = value;
-      }
-    }
-
-    private string username;
-    public string Username {
-      get { return username; }
-      set { username = value; }
-    }
-
-    private string password;
-    public string Password {
-      get { return password; }
-      set { password = value; }
-    }
-
-    private HiveServiceClient NewServiceClient() {
-      HiveServiceClient cl;
-      if (string.IsNullOrEmpty(username) && string.IsNullOrEmpty(password))
-        cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>();
-      else
-        cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>(null, null, username, password);
-      
-      return cl;
-    }
-
-    public T CallHiveService<T>(Func<IHiveService, T> call) {
-      HiveServiceClient client = NewServiceClient();
-      try {
-        return call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-
-    public void CallHiveService(Action<IHiveService> call) {
-      HiveServiceClient client = NewServiceClient();
-      try {
-        call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.Designer.cs	(revision 7132)
@@ -53,5 +53,5 @@
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("5")]
+        [global::System.Configuration.DefaultSettingValueAttribute("2")]
         public int MaxParallelDownloads {
             get {
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.settings
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.settings	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/Settings.settings	(revision 7132)
@@ -13,5 +13,5 @@
     </Setting>
     <Setting Name="MaxParallelDownloads" Type="System.Int32" Scope="Application">
-      <Value Profile="(Default)">5</Value>
+      <Value Profile="(Default)">2</Value>
     </Setting>
     <Setting Name="MaxRepeatServiceCalls" Type="System.Int32" Scope="Application">
Index: /trunk/sources/HeuristicLab.Clients.Hive/3.3/app.config
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive/3.3/app.config	(revision 7131)
+++ /trunk/sources/HeuristicLab.Clients.Hive/3.3/app.config	(revision 7132)
@@ -18,5 +18,5 @@
       </setting>
       <setting name="MaxParallelDownloads" serializeAs="String">
-        <value>5</value>
+        <value>2</value>
       </setting>
       <setting name="MaxRepeatServiceCalls" serializeAs="String">
