Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/DaoTests.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/DaoTests.cs	(revision 6712)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/DaoTests.cs	(revision 6717)
@@ -24,9 +24,6 @@
 using System.Linq;
 using System.Threading;
-using HeuristicLab.Services.Hive.Common.DataTransfer;
-using HeuristicLab.Services.Hive.Common.ServiceContracts;
-using HeuristicLab.Services.Hive.DataAccess;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
+using DT = HeuristicLab.Services.Hive.DataTransfer;
 
 namespace HeuristicLab.Services.Hive.Tests {
@@ -39,6 +36,6 @@
     }
 
-    private IHiveService GetLocalService() {
-      return new HiveService();
+    private HeuristicLab.Services.Hive.ServiceContracts.IHiveService GetLocalService() {
+      return new HeuristicLab.Services.Hive.HiveService();
     }
 
@@ -55,7 +52,7 @@
 
       DT.Job job1 = new DT.Job();
-      job1.State = JobState.Offline;
-      job1.StateLog.Add(new DT.StateLog { State = JobState.Offline, DateTime = DateTime.Now });
-      job1.Command = Command.Pause;
+      job1.State = DT.JobState.Offline;
+      job1.StateLog.Add(new DT.StateLog { State = DT.JobState.Offline, DateTime = DateTime.Now });
+      job1.Command = DT.Command.Pause;
       job1.HiveExperimentId = he.Id;
       job1.IsPrivileged = true;
@@ -110,8 +107,8 @@
 
       // test jobstates
-      job1.StateLog.Add(new DT.StateLog { State = JobState.Transferring, DateTime = DateTime.Now }); Thread.Sleep(10);
-      job1.StateLog.Add(new DT.StateLog { State = JobState.Calculating, DateTime = DateTime.Now }); Thread.Sleep(10);
-      job1.StateLog.Add(new DT.StateLog { State = JobState.Transferring, DateTime = DateTime.Now }); Thread.Sleep(10);
-      job1.StateLog.Add(new DT.StateLog { State = JobState.Finished, DateTime = DateTime.Now }); Thread.Sleep(10);
+      job1.StateLog.Add(new DT.StateLog { State = DT.JobState.Transferring, DateTime = DateTime.Now }); Thread.Sleep(10);
+      job1.StateLog.Add(new DT.StateLog { State = DT.JobState.Calculating, DateTime = DateTime.Now }); Thread.Sleep(10);
+      job1.StateLog.Add(new DT.StateLog { State = DT.JobState.Transferring, DateTime = DateTime.Now }); Thread.Sleep(10);
+      job1.StateLog.Add(new DT.StateLog { State = DT.JobState.Finished, DateTime = DateTime.Now }); Thread.Sleep(10);
       dao.UpdateJob(job1);
 
@@ -226,6 +223,6 @@
 
       DT.Job job = new DT.Job();
-      job.State = JobState.Offline;
-      job.StateLog.Add(new DT.StateLog { State = JobState.Offline, DateTime = DateTime.Now });
+      job.State = DT.JobState.Offline;
+      job.StateLog.Add(new DT.StateLog { State = DT.JobState.Offline, DateTime = DateTime.Now });
       job.HiveExperimentId = he.Id;
       job.Id = dao.AddJob(job);
@@ -235,5 +232,5 @@
       perm.GrantedByUserId = he.OwnerUserId;
       perm.GrantedUserId = Guid.NewGuid();
-      perm.Permission = Permission.Full;
+      perm.Permission = DT.Permission.Full;
       dao.AddHiveExperimentPermission(perm);
 
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive.Tests-3.3.csproj
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive.Tests-3.3.csproj	(revision 6712)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive.Tests-3.3.csproj	(revision 6717)
@@ -114,4 +114,5 @@
     <Reference Include="System.Data.Linq" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.ServiceModel" />
     <Reference Include="System.Transactions" />
@@ -135,8 +136,4 @@
       <Name>HeuristicLab.Hive-3.3</Name>
     </ProjectReference>
-    <ProjectReference Include="..\HeuristicLab.Services.Hive.Common\3.3\HeuristicLab.Services.Hive.Common-3.3.csproj">
-      <Project>{14424A16-48D4-445E-80BF-DDF617548BBB}</Project>
-      <Name>HeuristicLab.Services.Hive.Common-3.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Services.Hive.DataAccess\3.3\HeuristicLab.Services.Hive.DataAccess-3.3.csproj">
       <Project>{EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}</Project>
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockAuthorizationManager.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockAuthorizationManager.cs	(revision 6712)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockAuthorizationManager.cs	(revision 6717)
@@ -28,9 +28,9 @@
     }
 
-    public void AuthorizeForJob(Guid jobId, Common.DataTransfer.Permission requiredPermission) {
+    public void AuthorizeForJob(Guid jobId, DataTransfer.Permission requiredPermission) {
       // ok.
     }
 
-    public void AuthorizeForExperiment(Guid experimentId, Common.DataTransfer.Permission requiredPermission) {
+    public void AuthorizeForExperiment(Guid experimentId, DataTransfer.Permission requiredPermission) {
       // ok.
     }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs	(revision 6712)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs	(revision 6717)
@@ -23,10 +23,8 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Services.Hive.Common;
-using HeuristicLab.Services.Hive.Common.DataTransfer;
-using HeuristicLab.Services.Hive.Common.ServiceContracts;
+using HeuristicLab.Clients.Hive;
 using HeuristicLab.Services.Hive.Tests.Mocks;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
+using DT = HeuristicLab.Services.Hive.DataTransfer;
 
 namespace HeuristicLab.Services.Hive.Tests {
@@ -42,6 +40,6 @@
     }
 
-    private IHiveService GetLocalService() {
-      return new HiveService();
+    private HeuristicLab.Services.Hive.ServiceContracts.IHiveService GetLocalService() {
+      return new HeuristicLab.Services.Hive.HiveService();
     }
 
@@ -55,6 +53,6 @@
       // create job
       DT.Job job = new DT.Job() { CoresNeeded = 1, MemoryNeeded = 0, Priority = 0 };
-      job.State = JobState.Offline;
-      job.StateLog.Add(new StateLog { State = JobState.Offline, DateTime = DateTime.Now });
+      job.State = DT.JobState.Offline;
+      job.StateLog.Add(new DT.StateLog { State = DT.JobState.Offline, DateTime = DateTime.Now });
 
       DT.JobData jobData = new DT.JobData() {
@@ -80,5 +78,5 @@
       pluginData1.Data = new byte[] { 0, 1, 2, 3, 4, 5 };
 
-      plugin1.Id = service.AddPlugin(plugin1, new List<PluginData> { pluginData1 });
+      plugin1.Id = service.AddPlugin(plugin1, new List<DT.PluginData> { pluginData1 });
       pluginData1.PluginId = plugin1.Id;
 
@@ -87,5 +85,5 @@
 
       // create slave
-      DT.Slave slave = new Slave();
+      DT.Slave slave = new DT.Slave();
       slave.Id = Guid.NewGuid();
       slave.Name = "TestSlave";
@@ -94,5 +92,5 @@
       slave.CpuSpeed = 2800;
       slave.OperatingSystem = "Windows 3.11";
-      slave.CpuArchitecture = CpuArchitecture.x64;
+      slave.CpuArchitecture = DT.CpuArchitecture.x64;
 
       // add slave
@@ -112,5 +110,5 @@
       Assert.AreEqual(job.MemoryNeeded, jobLoaded.MemoryNeeded);
       Assert.AreEqual(job.Priority, jobLoaded.Priority);
-      Assert.AreEqual(JobState.Waiting, jobLoaded.State);
+      Assert.AreEqual(DT.JobState.Waiting, jobLoaded.State);
       Assert.IsTrue(job.PluginsNeededIds.SequenceEqual(jobLoaded.PluginsNeededIds));
       Assert.AreEqual(job.HiveExperimentId, jobLoaded.HiveExperimentId);
@@ -127,5 +125,5 @@
 
       // test assigned ressources
-      var actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
+      var actions = service.Heartbeat(new DT.Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
       Assert.AreEqual(1, actions.Count);
       Assert.AreEqual(MessageContainer.MessageType.CalculateJob, actions[0].Message);
@@ -136,10 +134,10 @@
 
       // slave is responsible for updating state to 'Calculating'
-      service.UpdateJobState(jobLoaded.Id, JobState.Calculating, slave.Id, null, null);
+      service.UpdateJobState(jobLoaded.Id, DT.JobState.Calculating, slave.Id, null, null);
 
       // send progress
       var progress = new Dictionary<Guid, TimeSpan>();
       progress.Add(job.Id, new TimeSpan(1, 5, 10, 20, 30));
-      actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 3, FreeMemory = 1024, JobProgress = progress });
+      actions = service.Heartbeat(new DT.Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 3, FreeMemory = 1024, JobProgress = progress });
       Assert.AreEqual(0, actions.Count);
 
@@ -155,5 +153,5 @@
 
       // set it to finished
-      service.UpdateJobState(jobLoaded.Id, JobState.Finished, slave.Id, null, null);
+      service.UpdateJobState(jobLoaded.Id, DT.JobState.Finished, slave.Id, null, null);
 
       // test if the job is returned for the resource (it should not be)
@@ -162,8 +160,8 @@
 
       // set job waiting again
-      service.UpdateJobState(job.Id, JobState.Waiting, null, null, string.Empty);
+      service.UpdateJobState(job.Id, DT.JobState.Waiting, null, null, string.Empty);
 
       // get job again
-      actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
+      actions = service.Heartbeat(new DT.Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
       Assert.AreEqual(1, actions.Count);
       Assert.AreEqual(MessageContainer.MessageType.CalculateJob, actions[0].Message);
@@ -171,9 +169,9 @@
 
       // create downtime which should make slave unavailable for calculation
-      Guid downtimeId = service.AddDowntime(new Downtime { ResourceId = slave.Id, StartDate = DateTime.Now - TimeSpan.FromMinutes(1), EndDate = DateTime.Now + TimeSpan.FromMinutes(1), Recurring = false });
+      Guid downtimeId = service.AddDowntime(new DT.Downtime { ResourceId = slave.Id, StartDate = DateTime.Now - TimeSpan.FromMinutes(1), EndDate = DateTime.Now + TimeSpan.FromMinutes(1), Recurring = false });
 
       progress.Clear();
       progress.Add(job.Id, new TimeSpan(1, 5, 10, 20, 30));
-      actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
+      actions = service.Heartbeat(new DT.Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
       Assert.AreEqual(1, actions.Count);
       Assert.AreEqual(MessageContainer.MessageType.PauseAll, actions[0].Message);
@@ -189,5 +187,5 @@
 
       // send another heartbeat with the deleted job; the server should command the abortion of the job
-      actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 3, FreeMemory = 1024, JobProgress = progress });
+      actions = service.Heartbeat(new DT.Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 3, FreeMemory = 1024, JobProgress = progress });
       Assert.AreEqual(1, actions.Count);
       Assert.AreEqual(MessageContainer.MessageType.AbortJob, actions[0].Message);
@@ -213,6 +211,6 @@
         FinishWhenChildJobsFinished = true
       };
-      parentJob.State = JobState.Offline;
-      parentJob.StateLog.Add(new StateLog { State = JobState.Offline, DateTime = DateTime.Now });
+      parentJob.State = DT.JobState.Offline;
+      parentJob.StateLog.Add(new DT.StateLog { State = DT.JobState.Offline, DateTime = DateTime.Now });
 
       DT.JobData parentJobData = new DT.JobData() { Data = new byte[0] };
@@ -224,11 +222,11 @@
         Priority = 0
       };
-      childJob.State = JobState.Offline;
-      childJob.StateLog.Add(new StateLog { State = JobState.Offline, DateTime = DateTime.Now });
+      childJob.State = DT.JobState.Offline;
+      childJob.StateLog.Add(new DT.StateLog { State = DT.JobState.Offline, DateTime = DateTime.Now });
 
       DT.JobData childJobData = new DT.JobData() { Data = new byte[1000] };
 
       // create slave
-      DT.Slave slave = new Slave();
+      DT.Slave slave = new DT.Slave();
       slave.Id = Guid.NewGuid();
       slave.Name = "TestSlave";
@@ -237,5 +235,5 @@
       slave.CpuSpeed = 2800;
       slave.OperatingSystem = "Windows 3.11";
-      slave.CpuArchitecture = CpuArchitecture.x64;
+      slave.CpuArchitecture = DT.CpuArchitecture.x64;
 
       // add slave
@@ -258,5 +256,5 @@
       Assert.AreEqual(childJob.ParentJobId, childJobLoaded.ParentJobId);
       Assert.AreEqual(childJob.HiveExperimentId, childJobLoaded.HiveExperimentId);
-      Assert.AreEqual(JobState.Waiting, childJobLoaded.State);
+      Assert.AreEqual(DT.JobState.Waiting, childJobLoaded.State);
       Assert.AreEqual(false, childJobLoaded.FinishWhenChildJobsFinished);
       Assert.AreEqual(false, childJobLoaded.IsParentJob);
@@ -270,5 +268,5 @@
 
       // test heartbeat
-      var actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
+      var actions = service.Heartbeat(new DT.Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() });
       Assert.AreEqual(1, actions.Count); // only the child job should be assigned
       Assert.AreEqual(MessageContainer.MessageType.CalculateJob, actions[0].Message);
@@ -282,5 +280,5 @@
 
       // set child job to finished
-      childJobLoaded = service.UpdateJobState(childJobLoaded.Id, JobState.Finished, slave.Id, null, null);
+      childJobLoaded = service.UpdateJobState(childJobLoaded.Id, DT.JobState.Finished, slave.Id, null, null);
 
       // lifecycle - let it process one server-heartbeat; this should set the parent job to finished
@@ -308,10 +306,10 @@
       DT.HiveExperiment e1 = new DT.HiveExperiment() { Name = "TestExperiment", Description = "" };
       e1.Id = service.AddHiveExperiment(e1);
-      
+
       var e1loaded = service.GetHiveExperiment(e1.Id);
       Assert.AreEqual(Permission.Full, e1loaded.Permission);
       var allExp = service.GetHiveExperiments();
       Assert.AreEqual(1, allExp.Count(x => x.Id == e1.Id));
-      
+
       // change to user2
       mockServiceLocator.SetCurrentUserId(MockUserManager.MockUserId2);
@@ -319,5 +317,6 @@
         e1loaded = service.GetHiveExperiment(e1.Id);
         Assert.Fail("Access should not be possible");
-      } catch { /* ok, cool */ }
+      }
+      catch { /* ok, cool */ }
       allExp = service.GetHiveExperiments();
       Assert.AreEqual(0, allExp.Count(x => x.Id == e1.Id));
@@ -325,5 +324,5 @@
       // user2 should not be able to grant permissions
       try {
-        service.GrantPermission(e1.Id, MockUserManager.MockUserId2, Permission.Read);
+        service.GrantPermission(e1.Id, MockUserManager.MockUserId2, DT.Permission.Read);
         Assert.Fail("Should not be possible to grant permission due to missing permission for User2");
       }
@@ -332,5 +331,5 @@
       // switch back to user1 (owner) and grant user2 permissions
       mockServiceLocator.SetCurrentUserId(MockUserManager.MockUserId1);
-      service.GrantPermission(e1.Id, MockUserManager.MockUserId2, Permission.Read);
+      service.GrantPermission(e1.Id, MockUserManager.MockUserId2, DT.Permission.Read);
 
       // back to user2
@@ -343,5 +342,5 @@
       // user2 should still not be able to grant permissions
       try {
-        service.GrantPermission(e1.Id, MockUserManager.MockUserId2, Permission.Read);
+        service.GrantPermission(e1.Id, MockUserManager.MockUserId2, DT.Permission.Read);
         Assert.Fail("Should not be possible to grant permission due to missing permission for User2");
       }
@@ -350,5 +349,5 @@
       // back to user1
       mockServiceLocator.SetCurrentUserId(MockUserManager.MockUserId1);
-      service.GrantPermission(e1.Id, MockUserManager.MockUserId2, Permission.Full);
+      service.GrantPermission(e1.Id, MockUserManager.MockUserId2, DT.Permission.Full);
 
       // back to user2
@@ -358,7 +357,7 @@
       allExp = service.GetHiveExperiments();
       Assert.AreEqual(1, allExp.Count(x => x.Id == e1.Id));
-      
+
       // grant rights to user3, now this should be possible due to full permissions
-      service.GrantPermission(e1.Id, MockUserManager.MockUserId3, Permission.Read);
+      service.GrantPermission(e1.Id, MockUserManager.MockUserId3, DT.Permission.Read);
 
       // back to user1 and revoke rights for user2
