Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.Optimizer/3.3/Plugin.cs.frame
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.Optimizer/3.3/Plugin.cs.frame	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.Optimizer/3.3/Plugin.cs.frame	(revision 13389)
@@ -50,4 +50,6 @@
   internal class HeuristicLabOptimizerApplication : ApplicationBase {
     public override void Run(ICommandLineArgument[] args) {
+      Application.EnableVisualStyles();
+      Application.SetCompatibleTextRenderingDefault(false);
       HeuristicLab.MainForm.WindowsForms.MainForm mainForm = null;
 
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/HeuristicLab.PluginInfrastructure.UI-4.0.csproj
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/HeuristicLab.PluginInfrastructure.UI-4.0.csproj	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/HeuristicLab.PluginInfrastructure.UI-4.0.csproj	(revision 13389)
@@ -74,10 +74,4 @@
       <DependentUpon>SplashScreen.cs</DependentUpon>
     </Compile>
-    <Compile Include="StarterForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="StarterForm.Designer.cs">
-      <DependentUpon>StarterForm.cs</DependentUpon>
-    </Compile>
     <Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
   </ItemGroup>
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/SplashScreen.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/SplashScreen.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/SplashScreen.cs	(revision 13389)
@@ -24,26 +24,23 @@
 using System.Reflection;
 using System.Windows.Forms;
-using HeuristicLab.PluginInfrastructure.Manager;
 
 namespace HeuristicLab.PluginInfrastructure.UI {
-  internal partial class SplashScreen : Form {
+  public partial class SplashScreen : Form {
     private const int FADE_INTERVAL = 50;
     private Timer fadeTimer;
     private int initialInterval;
-    private PluginManager pluginManager;
 
-    internal SplashScreen() {
+    private SplashScreen() {
       InitializeComponent();
     }
 
-    internal SplashScreen(PluginManager manager, int initialInterval)
+    public SplashScreen(string initialText, int initialInterval)
       : this() {
       this.initialInterval = initialInterval;
-      this.pluginManager = manager;
 
       var entryAssembly = Assembly.GetEntryAssembly();
-      RegisterPluginManagerEventHandlers();
+      // RegisterPluginManagerEventHandlers();
 
-      versionLabel.Text = "Version " + entryAssembly.GetFileVersion() + " " 
+      versionLabel.Text = "Version " + entryAssembly.GetFileVersion() + " "
         + entryAssembly.GetCustomAttributes().OfType<AssemblyInformationalVersionAttribute>().First().InformationalVersion; // code name
       infoLabel.Text = "";
@@ -55,52 +52,18 @@
       fadeTimer.Tick += fadeTimer_Elapsed;
       fadeTimer.Interval = initialInterval;
+      fadeTimer.Start();
+
+      Opacity = 1;
+      infoLabel.Text = initialText;
+
     }
 
-    #region events
-    private void RegisterPluginManagerEventHandlers() {
-      pluginManager.ApplicationStarted += new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarted);
-      pluginManager.ApplicationStarting += new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarting);
-      pluginManager.Initializing += new EventHandler<PluginInfrastructureEventArgs>(manager_Initializing);
-      pluginManager.Initialized += new EventHandler<PluginInfrastructureEventArgs>(manager_Initialized);
-      pluginManager.PluginLoaded += new EventHandler<PluginInfrastructureEventArgs>(manager_PluginLoaded);
-      pluginManager.PluginUnloaded += new EventHandler<PluginInfrastructureEventArgs>(manager_PluginUnloaded);
-    }
-
-    private void DeregisterPluginManagerEventHandlers() {
-      pluginManager.ApplicationStarted -= new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarted);
-      pluginManager.ApplicationStarting -= new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarting);
-      pluginManager.Initializing -= new EventHandler<PluginInfrastructureEventArgs>(manager_Initializing);
-      pluginManager.Initialized -= new EventHandler<PluginInfrastructureEventArgs>(manager_Initialized);
-      pluginManager.PluginLoaded -= new EventHandler<PluginInfrastructureEventArgs>(manager_PluginLoaded);
-      pluginManager.PluginUnloaded -= new EventHandler<PluginInfrastructureEventArgs>(manager_PluginUnloaded);
-    }
-
-    private void manager_PluginUnloaded(object sender, PluginInfrastructureEventArgs e) {
-      SafeUpdateMessage("Unloaded " + e.Entity);
-    }
-
-    private void manager_PluginLoaded(object sender, PluginInfrastructureEventArgs e) {
-      SafeUpdateMessage("Loaded " + e.Entity);
-    }
-
-    private void manager_Initialized(object sender, PluginInfrastructureEventArgs e) {
-      SafeUpdateMessage("Initialized");
-    }
-
-    private void manager_Initializing(object sender, PluginInfrastructureEventArgs e) {
-      SafeUpdateMessage("Initializing");
-    }
-
-    private void manager_ApplicationStarting(object sender, PluginInfrastructureEventArgs e) {
-      SafeUpdateMessage("Starting " + e.Entity);
-    }
-
-    private void manager_ApplicationStarted(object sender, PluginInfrastructureEventArgs e) {
-      SafeUpdateMessage("Started " + e.Entity);
-    }
-    // called from event handlers
-    private void SafeUpdateMessage(string msg) {
+    public void UpdateMessage(string msg) {
       try {
-        Invoke((Action<string>)UpdateMessage, msg);
+        if (InvokeRequired) Invoke((Action<string>)UpdateMessage, msg);
+        else {
+          ResetFadeTimer();
+          infoLabel.Text = msg;
+        }
       } catch (ObjectDisposedException) { }
     }
@@ -111,25 +74,4 @@
       FadeOut();
     }
-    #endregion
-
-    public void Show(string initialText) {
-      if (InvokeRequired) Invoke((Action<string>)Show, initialText);
-      else {
-        Opacity = 1;
-        infoLabel.Text = initialText;
-        ResetFadeTimer();
-        Show();
-      }
-    }
-
-    public void Show(IWin32Window owner, string initialText) {
-      if (InvokeRequired) Invoke((Action<IWin32Window, string>)Show, owner, initialText);
-      else {
-        Opacity = 1;
-        infoLabel.Text = initialText;
-        ResetFadeTimer();
-        Show(owner);
-      }
-    }
 
     private void ResetFadeTimer() {
@@ -138,10 +80,4 @@
       fadeTimer.Interval = initialInterval;
       fadeTimer.Start();
-    }
-
-    private void UpdateMessage(string msg) {
-      ResetFadeTimer();
-      infoLabel.Text = msg;
-      Application.DoEvents(); // force immediate update of splash screen control
     }
 
@@ -156,12 +92,6 @@
         Opacity = 0;
         fadeTimer.Stop();
-        Hide();
+        Close();
       }
-    }
-
-    protected override void OnClosing(System.ComponentModel.CancelEventArgs e) {
-      // deregister events when form is closing
-      DeregisterPluginManagerEventHandlers();
-      base.OnClosing(e);
     }
   }
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/ApplicationDescription.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/ApplicationDescription.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/ApplicationDescription.cs	(revision 13389)
@@ -22,5 +22,5 @@
 using System;
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
   /// <summary>
   /// Class that provides information about an application.
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginDescription.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginDescription.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginDescription.cs	(revision 13389)
@@ -24,5 +24,5 @@
 using System.Linq;
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
   /// <summary>
   /// Holds information of loaded plugins that is needed for plugin management.
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginDescriptionIterator.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginDescriptionIterator.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginDescriptionIterator.cs	(revision 13389)
@@ -23,5 +23,5 @@
 using System.Linq;
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
   internal static class PluginDescriptionIterator {
     internal static IEnumerable<PluginDescription> IterateDependenciesBottomUp(IEnumerable<PluginDescription> pluginDescriptions) {
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginFile.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginFile.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginFile.cs	(revision 13389)
@@ -22,5 +22,5 @@
 using System;
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
   /// <summary>
   /// Plugin files have a name and a type.
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginInfrastructureEventArgs.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginInfrastructureEventArgs.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginInfrastructureEventArgs.cs	(revision 13389)
@@ -22,5 +22,5 @@
 using System;
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
   [Serializable]
   public sealed class PluginInfrastructureEventArgs : EventArgs {
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginManager.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginManager.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginManager.cs	(revision 13389)
@@ -26,5 +26,5 @@
 using System.Security.Permissions;
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
 
   // must extend MarshalByRefObject because of event passing between Loader and PluginManager (each in it's own AppDomain)
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginValidator.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginValidator.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginValidator.cs	(revision 13389)
@@ -29,5 +29,5 @@
 
 
-namespace HeuristicLab.PluginInfrastructure.Manager {
+namespace HeuristicLab.PluginInfrastructure {
   /// <summary>
   /// Discovers all installed plugins in the plugin directory. Checks correctness of plugin meta-data and if
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs	(revision 13389)
@@ -25,5 +25,4 @@
 using System.Linq;
 using System.Reflection;
-using HeuristicLab.PluginInfrastructure.Manager;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/SandboxManager.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/SandboxManager.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/SandboxManager.cs	(revision 13389)
@@ -24,7 +24,6 @@
 using System.Security;
 using System.Security.Permissions;
-using HeuristicLab.PluginInfrastructure.Manager;
 
-namespace HeuristicLab.PluginInfrastructure.Sandboxing {
+namespace HeuristicLab.PluginInfrastructure {
   // used by Hive Slave
   public static class SandboxManager {
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab/3.3/HeuristicLab-3.3.csproj
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab/3.3/HeuristicLab-3.3.csproj	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab/3.3/HeuristicLab-3.3.csproj	(revision 13389)
@@ -193,4 +193,8 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/RefactorPluginInfrastructure-2522/HeuristicLab/3.3/Program.cs
===================================================================
--- branches/RefactorPluginInfrastructure-2522/HeuristicLab/3.3/Program.cs	(revision 13388)
+++ branches/RefactorPluginInfrastructure-2522/HeuristicLab/3.3/Program.cs	(revision 13389)
@@ -21,5 +21,10 @@
 
 using System;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
 using System.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.PluginInfrastructure.UI;
 
@@ -41,5 +46,19 @@
           Application.EnableVisualStyles();
           Application.SetCompatibleTextRenderingDefault(false);
-          Application.Run(new StarterForm(args));
+
+          string pluginPath = Path.GetFullPath(Application.StartupPath);
+
+          var pluginManager = new PluginManager(pluginPath);
+
+          var splashScreen = new SplashScreen("Loading plugins...", 3000);
+          pluginManager.Initializing += (sender, eventArgs) => splashScreen.UpdateMessage("Loading plugins...");
+          pluginManager.PluginLoaded += (sender, eventArgs) => splashScreen.UpdateMessage("Loaded " + eventArgs.Entity.ToString());
+          pluginManager.ApplicationStarting += (sender, eventArgs) => splashScreen.UpdateMessage("Starting " + eventArgs.Entity.ToString());
+          pluginManager.ApplicationStarted += (sender, eventArgs) => splashScreen.UpdateMessage("Started " + eventArgs.Entity.ToString());
+
+
+          DiscoverPluginsAndRunOptimizerAsync(pluginManager, args);
+
+          Application.Run(splashScreen);
         } catch (Exception ex) {
           MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -47,4 +66,21 @@
       }
     }
+
+    private static void DiscoverPluginsAndRunOptimizerAsync(PluginManager pluginManager, string[] args) {
+      // STAThread is necessary for a UI component we are using in the application
+      var t = new Thread(() => {
+        try {
+          pluginManager.DiscoverAndCheckPlugins();
+          var optimizerApp = pluginManager.Applications.FirstOrDefault(app => app.Name == "Optimizer");
+          pluginManager.Run(optimizerApp, CommandLineArgumentHandling.GetArguments(args));
+        } catch (Exception ex) {
+          MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        }
+      });
+
+      // cannot use a task because we need to set STA
+      t.SetApartmentState(ApartmentState.STA);
+      t.Start();
+    }
   }
 }
