Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/HeuristicLab.Services.Hive.JanitorService-3.3.csproj
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/HeuristicLab.Services.Hive.JanitorService-3.3.csproj	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/HeuristicLab.Services.Hive.JanitorService-3.3.csproj	(revision 12969)
@@ -11,5 +11,5 @@
     <RootNamespace>HeuristicLab.Services.Hive.JanitorService</RootNamespace>
     <AssemblyName>HeuristicLab.Services.Hive.JanitorService-3.3</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <TargetFrameworkProfile>
     </TargetFrameworkProfile>
@@ -25,4 +25,5 @@
     <WarningLevel>4</WarningLevel>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -36,4 +37,5 @@
     </DocumentationFile>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
@@ -45,4 +47,5 @@
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
@@ -56,4 +59,5 @@
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
@@ -65,4 +69,5 @@
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
@@ -76,4 +81,5 @@
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup>
@@ -118,4 +124,12 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Services.Access.DataAccess\3.3\HeuristicLab.Services.Access.DataAccess-3.3.csproj">
+      <Project>{0f652437-998a-4eab-8bf1-444b5fe8ce97}</Project>
+      <Name>HeuristicLab.Services.Access.DataAccess-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Services.Access\3.3\HeuristicLab.Services.Access-3.3.csproj">
+      <Project>{9fac0b23-2730-452a-9ba0-d7ca1746c541}</Project>
+      <Name>HeuristicLab.Services.Access-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>
@@ -137,5 +151,5 @@
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
-   <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
 set ProjectDir=$(ProjectDir)
 set SolutionDir=$(SolutionDir)
@@ -143,5 +157,5 @@
 
 call PreBuildEvent.cmd</PreBuildEvent>
-<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 export ProjectDir=$(ProjectDir)
 export SolutionDir=$(SolutionDir)
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.Designer.cs
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.Designer.cs	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.Designer.cs	(revision 12969)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.cs
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.cs	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.cs	(revision 12969)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -26,5 +26,6 @@
   public partial class JanitorService : ServiceBase {
     private HiveJanitor janitor;
-    private Thread janitorThread;
+    private Thread janitorCleanupThread;
+    private Thread janitorGenerateStatisticsThread;
 
     public JanitorService() {
@@ -35,12 +36,19 @@
       janitor = new HiveJanitor();
 
-      janitorThread = new Thread(janitor.Run);
-      janitorThread.IsBackground = true; //dont keep app alive
-      janitorThread.Start();
+      janitorCleanupThread = new Thread(janitor.RunCleanup) {
+        IsBackground = true
+      };
+      janitorGenerateStatisticsThread = new Thread(janitor.RunGenerateStatistics) {
+        IsBackground = true
+      };
+
+      janitorCleanupThread.Start();
+      janitorGenerateStatisticsThread.Start();
     }
 
     protected override void OnStop() {
       janitor.StopJanitor();
-      janitorThread.Join();
+      janitorCleanupThread.Join();
+      janitorGenerateStatisticsThread.Join();
     }
   }
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/Program.cs
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/Program.cs	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/Program.cs	(revision 12969)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -20,18 +20,36 @@
 #endregion
 
+using System;
+using System.Configuration.Install;
+using System.Reflection;
 using System.ServiceProcess;
 
 namespace HeuristicLab.Services.Hive.JanitorService {
   static class Program {
-    /// <summary>
-    /// The main entry point for the application.
-    /// </summary>
-    static void Main() {
-      ServiceBase[] ServicesToRun;
-      ServicesToRun = new ServiceBase[] 
-			{ 
-				new JanitorService() 
-			};
-      ServiceBase.Run(ServicesToRun);
+    private static void Main(string[] args) {
+      // Install as service, see http://stackoverflow.com/a/12703878
+      if (Environment.UserInteractive) {
+        try {
+          string parameter = string.Concat(args);
+          switch (parameter) {
+            case "--install":
+              ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
+              break;
+            case "--uninstall":
+              ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
+              break;
+          }
+        }
+        catch (Exception ex) {
+          Console.WriteLine("Error on (un)install of Hive Slave service: " + Environment.NewLine + ex);
+        }
+      } else {
+        ServiceBase[] ServicesToRun;
+        ServicesToRun = new ServiceBase[]
+        {
+          new JanitorService()
+        };
+        ServiceBase.Run(ServicesToRun);
+      }
     }
   }
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.Designer.cs
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.Designer.cs	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.Designer.cs	(revision 12969)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.cs
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.cs	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.cs	(revision 12969)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/Properties/AssemblyInfo.cs.frame	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/Properties/AssemblyInfo.cs.frame	(revision 12969)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -32,5 +32,5 @@
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("HeuristicLab")]
-[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyCopyright("(c) 2002-2015 HEAL")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -55,3 +55,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.9.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.12.$WCREV$")]
Index: branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/app.config
===================================================================
--- branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/app.config	(revision 10225)
+++ branches/gteufl/HeuristicLab.Services.Hive.JanitorService/3.3/app.config	(revision 12969)
@@ -1,3 +1,3 @@
 <?xml version="1.0"?>
 <configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
