Index: /code/trunk/src/core/input/KeyBinder.cc
===================================================================
--- /code/trunk/src/core/input/KeyBinder.cc	(revision 1566)
+++ /code/trunk/src/core/input/KeyBinder.cc	(revision 1567)
@@ -234,8 +234,8 @@
   void KeyBinder::setConfigValues()
   {
-    SetConfigValueGeneric(KeyBinder, analogThreshold_, 0.01f)  .description("Threshold for analog axes until which the state is 0.");
+    SetConfigValueGeneric(KeyBinder, analogThreshold_, 0.05f)  .description("Threshold for analog axes until which the state is 0.");
     SetConfigValueGeneric(KeyBinder, mouseSensitivity_, 1.0f)  .description("Mouse sensitivity.");
     SetConfigValueGeneric(KeyBinder, bDeriveMouseInput_, false).description("Whether or not to derive moues movement for the absolute value.");
-    SetConfigValueGeneric(KeyBinder, derivePeriod_, 0.5f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier.");
+    SetConfigValueGeneric(KeyBinder, derivePeriod_, 0.05f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier.");
     SetConfigValueGeneric(KeyBinder, mouseSensitivityDerived_, 1.0f).description("Mouse sensitivity if mouse input is derived.");
     SetConfigValueGeneric(KeyBinder, bClipMouse_, true).description("Whether or not to clip absolute value of mouse in non derive mode.");
Index: /code/trunk/src/orxonox/Orxonox.cc
===================================================================
--- /code/trunk/src/orxonox/Orxonox.cc	(revision 1566)
+++ /code/trunk/src/orxonox/Orxonox.cc	(revision 1567)
@@ -116,6 +116,5 @@
   {
     // keep in mind: the order of deletion is very important!
-//    if (this->orxonoxHUD_)
-//      delete this->orxonoxHUD_;
+    this->orxonoxHUD_->destroy();
     Loader::close();
     InputManager::destroy();
@@ -331,4 +330,5 @@
     COUT(3) << "Orxonox: Loading HUD..." << std::endl;
     orxonoxHUD_ = &HUD::getSingleton();
+    orxonoxHUD_->initialise();
     return true;
   }
Index: /code/trunk/src/orxonox/hud/HUD.cc
===================================================================
--- /code/trunk/src/orxonox/hud/HUD.cc	(revision 1566)
+++ /code/trunk/src/orxonox/hud/HUD.cc	(revision 1567)
@@ -46,5 +46,4 @@
 #include "RadarOverlayElement.h"
 #include "Navigation.h"
-#include "OverlayElementFactories.h"
 
 namespace orxonox
@@ -59,12 +58,29 @@
     HUD::HUD()
     {
+        orxonoxHUD_ = 0;
+        container_ = 0;
+        fpsText_ = 0;
+        rTRText_ = 0;
+        energyBar_ = 0;
+        speedoBar_ = 0;
+        radar_ = 0;
+        nav_ = 0;
+        bool showFPS_ = true;
+        bool showRenderTime_ = true;
+    }
+
+    HUD::~HUD()
+    {
+        this->destroy();
+    }
+
+    void HUD::initialise()
+    {
         showFPS_ = true;
         showRenderTime_ = true;
 
         // create Factories
-        barOverlayElementFactory_ = new BarOverlayElementFactory();
-        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(barOverlayElementFactory_);
-        radarOverlayElementFactory_ = new RadarOverlayElementFactory();
-        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(radarOverlayElementFactory_);
+        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(&barOverlayElementFactory_);
+        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(&radarOverlayElementFactory_);
 
         orxonoxHUD_ = Ogre::OverlayManager::getSingleton().create("Orxonox/HUD");
@@ -139,16 +155,31 @@
     }
 
-    HUD::~HUD()
-    {
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->container_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->fpsText_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->rTRText_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->energyBar_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->speedoBar_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->radar_);
-
-        delete this->nav_;
-        delete this->barOverlayElementFactory_;
-        delete this->radarOverlayElementFactory_;
+    void HUD::destroy()
+    {
+        if (this->container_)
+          Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->container_);
+        this->container_ = 0;
+        if (this->fpsText_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->fpsText_);
+        this->fpsText_ = 0;
+        if (this->rTRText_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->rTRText_);
+        this->rTRText_ = 0;
+        if (this->energyBar_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->energyBar_);
+        this->energyBar_ = 0;
+        if (this->speedoBar_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->speedoBar_);
+        this->speedoBar_ = 0;
+        if (this->radar_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->radar_);
+        this->radar_ = 0;
+        if (this->orxonoxHUD_)
+            Ogre::OverlayManager::getSingleton().destroy(this->orxonoxHUD_);
+        this->orxonoxHUD_ = 0;
+
+        if (this->nav_)
+            delete this->nav_;
+        this->nav_ = 0;
     }
 
Index: /code/trunk/src/orxonox/hud/HUD.h
===================================================================
--- /code/trunk/src/orxonox/hud/HUD.h	(revision 1566)
+++ /code/trunk/src/orxonox/hud/HUD.h	(revision 1567)
@@ -37,4 +37,5 @@
 #include "objects/Tickable.h"
 #include "util/Math.h"
+#include "OverlayElementFactories.h"
 
 namespace orxonox
@@ -43,5 +44,7 @@
     {
       public:
-        static HUD& getSingleton();
+        void initialise();
+        void destroy();
+
         virtual void tick(float);
 
@@ -54,4 +57,6 @@
         inline std::list<RadarObject*>& getRadarObjects()
             { return this->roSet_; }
+
+        static HUD& getSingleton();
 
         static void setEnergy(float value);
@@ -66,11 +71,10 @@
         ~HUD();
 
-        static HUD* instance_s;
+        std::list<RadarObject*> roSet_;
+        BarOverlayElementFactory barOverlayElementFactory_;
+        RadarOverlayElementFactory radarOverlayElementFactory_;
 
-        std::list<RadarObject*> roSet_;
         Ogre::Overlay* orxonoxHUD_;
         Ogre::OverlayContainer* container_;
-        BarOverlayElementFactory* barOverlayElementFactory_;
-        RadarOverlayElementFactory* radarOverlayElementFactory_;
         Ogre::TextAreaOverlayElement* fpsText_;
         Ogre::TextAreaOverlayElement* rTRText_;
Index: /code/trunk/visual_studio/base_properties_release.vsprops
===================================================================
--- /code/trunk/visual_studio/base_properties_release.vsprops	(revision 1566)
+++ /code/trunk/visual_studio/base_properties_release.vsprops	(revision 1567)
@@ -9,5 +9,4 @@
 		Name="VCCLCompilerTool"
 		Optimization="2"
-		WholeProgramOptimization="false"
 		PreprocessorDefinitions="NDEBUG"
 		RuntimeLibrary="2"
Index: /code/trunk/visual_studio/vc8/core.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/core.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/core.vcproj	(revision 1567)
@@ -82,5 +82,5 @@
 			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\core_properties.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
Index: /code/trunk/visual_studio/vc8/cpptcl.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/cpptcl.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/cpptcl.vcproj	(revision 1567)
@@ -73,5 +73,5 @@
 			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\cpptcl_properties.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
Index: /code/trunk/visual_studio/vc8/network.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/network.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/network.vcproj	(revision 1567)
@@ -73,5 +73,5 @@
 			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\network_properties.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
Index: /code/trunk/visual_studio/vc8/ois.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/ois.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/ois.vcproj	(revision 1567)
@@ -24,4 +24,5 @@
 			InheritedPropertySheets="..\directory_properties.vsprops"
 			CharacterSet="2"
+			WholeProgramOptimization="1"
 			>
 			<Tool
@@ -76,5 +77,4 @@
 				EnableCOMDATFolding="2"
 				OptimizeForWindows98="1"
-				LinkTimeCodeGeneration="1"
 				ImportLibrary="$(RootDir)lib\$(TargetName).lib"
 			/>
Index: /code/trunk/visual_studio/vc8/orxonox.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/orxonox.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/orxonox.vcproj	(revision 1567)
@@ -84,5 +84,5 @@
 			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\orxonox_properties.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
Index: /code/trunk/visual_studio/vc8/tixml.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/tixml.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/tixml.vcproj	(revision 1567)
@@ -73,5 +73,5 @@
 			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\tixml_properties.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
Index: /code/trunk/visual_studio/vc8/tolua.vcproj
===================================================================
--- /code/trunk/visual_studio/vc8/tolua.vcproj	(revision 1566)
+++ /code/trunk/visual_studio/vc8/tolua.vcproj	(revision 1567)
@@ -73,5 +73,5 @@
 			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\tolua_properties.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
