Index: code/trunk/src/core/input/CMakeLists.txt
===================================================================
--- code/trunk/src/core/input/CMakeLists.txt	(revision 3084)
+++ code/trunk/src/core/input/CMakeLists.txt	(revision 3196)
@@ -1,5 +1,4 @@
 ADD_SOURCE_FILES(CORE_SRC_FILES
   Button.cc
-  CalibratorCallback.cc
   ExtendedInputState.cc
   HalfAxis.cc
Index: code/trunk/src/core/input/CalibratorCallback.cc
===================================================================
--- code/trunk/src/core/input/CalibratorCallback.cc	(revision 3084)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program 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 2
- *   of the License, or (at your option) any later version.
- *
- *   This program 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 this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-    Implementation of the different input handlers.
-*/
-
-#include "CalibratorCallback.h"
-#include "InputManager.h"
-
-namespace orxonox
-{
-    void CalibratorCallback::keyPressed(const orxonox::KeyEvent &evt)
-    {
-        if (evt.key == KeyCode::Return)
-        {
-            //InputManager::setInputState(InputManager::IS_NOCALIBRATE);
-        }
-    }
-}
Index: code/trunk/src/core/input/CalibratorCallback.h
===================================================================
--- code/trunk/src/core/input/CalibratorCallback.h	(revision 3084)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program 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 2
- *   of the License, or (at your option) any later version.
- *
- *   This program 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 this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-    Different definitions of input processing.
-*/
-
-#ifndef _CalibratorCallback_H__
-#define _CalibratorCallback_H__
-
-#include "core/CorePrereqs.h"
-#include "InputInterfaces.h"
-
-namespace orxonox
-{
-    class _CoreExport CalibratorCallback : public KeyHandler
-    {
-    public:
-        CalibratorCallback()  { }
-        ~CalibratorCallback() { }
-
-    private:
-        void keyPressed (const KeyEvent& evt);
-        void keyReleased(const KeyEvent& evt) { }
-        void keyHeld    (const KeyEvent& evt) { }
-
-        void updateInput(float dt) { }
-    };
-}
-
-#endif /* _CalibratorCallback_H__ */
Index: code/trunk/src/core/input/ExtendedInputState.cc
===================================================================
--- code/trunk/src/core/input/ExtendedInputState.cc	(revision 3084)
+++ code/trunk/src/core/input/ExtendedInputState.cc	(revision 3196)
@@ -36,5 +36,5 @@
 
 #include <cassert>
-#include "util/Debug.h"
+#include "core/Executor.h"
 
 namespace orxonox
@@ -457,3 +457,15 @@
         this->bHandlersChanged_ = true;
     }
+
+    void ExtendedInputState::onEnter()
+    {
+        if (executorOnEnter_)
+            (*executorOnEnter_)();
+    }
+
+    void ExtendedInputState::onLeave()
+    {
+        if (executorOnLeave_)
+            (*executorOnLeave_)();
+    }
 }
Index: code/trunk/src/core/input/ExtendedInputState.h
===================================================================
--- code/trunk/src/core/input/ExtendedInputState.h	(revision 3084)
+++ code/trunk/src/core/input/ExtendedInputState.h	(revision 3196)
@@ -38,5 +38,4 @@
 
 #include <vector>
-
 #include "InputInterfaces.h"
 #include "InputState.h"
@@ -89,4 +88,7 @@
         void update();
 
+        void onEnter();
+        void onLeave();
+
         std::vector<KeyHandler*>                    keyHandlers_;
         std::vector<MouseHandler*>                  mouseHandlers_;
Index: code/trunk/src/core/input/HalfAxis.h
===================================================================
--- code/trunk/src/core/input/HalfAxis.h	(revision 3084)
+++ code/trunk/src/core/input/HalfAxis.h	(revision 3196)
@@ -37,4 +37,5 @@
 
 #include "core/CorePrereqs.h"
+
 #include "Button.h"
 #include "InputCommands.h"
Index: code/trunk/src/core/input/InputBuffer.cc
===================================================================
--- code/trunk/src/core/input/InputBuffer.cc	(revision 3084)
+++ code/trunk/src/core/input/InputBuffer.cc	(revision 3196)
@@ -28,6 +28,4 @@
 
 #include "InputBuffer.h"
-
-#include <iostream>
 
 #include "util/Clipboard.h"
@@ -57,5 +55,5 @@
     }
 
-    InputBuffer::InputBuffer(const std::string allowedChars)
+    InputBuffer::InputBuffer(const std::string& allowedChars)
     {
         RegisterRootObject(InputBuffer);
Index: code/trunk/src/core/input/InputBuffer.h
===================================================================
--- code/trunk/src/core/input/InputBuffer.h	(revision 3084)
+++ code/trunk/src/core/input/InputBuffer.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "core/CorePrereqs.h"
 
+#include <list>
 #include <string>
-#include <list>
-
 #include "core/OrxonoxClass.h"
 #include "InputInterfaces.h"
@@ -80,5 +79,5 @@
             InputBuffer();
             ~InputBuffer();
-            InputBuffer(const std::string allowedChars);
+            InputBuffer(const std::string& allowedChars);
 
             void setConfigValues();
@@ -145,5 +144,5 @@
             void updated(const char& update, bool bSingleInput);
 
-            inline std::string get() const
+            inline const std::string& get() const
                 { return this->buffer_; }
             inline unsigned int getSize() const
Index: code/trunk/src/core/input/InputCommands.cc
===================================================================
--- code/trunk/src/core/input/InputCommands.cc	(revision 3084)
+++ code/trunk/src/core/input/InputCommands.cc	(revision 3196)
@@ -35,5 +35,4 @@
 #include "InputCommands.h"
 #include "util/Math.h"
-#include "core/CommandExecutor.h"
 
 namespace orxonox
Index: code/trunk/src/core/input/InputInterfaces.h
===================================================================
--- code/trunk/src/core/input/InputInterfaces.h	(revision 3084)
+++ code/trunk/src/core/input/InputInterfaces.h	(revision 3196)
@@ -38,7 +38,7 @@
 #include "core/CorePrereqs.h"
 
-#include "ois/OISKeyboard.h"
-#include "ois/OISMouse.h"
-#include "ois/OISJoyStick.h"
+#include <ois/OISKeyboard.h>
+#include <ois/OISMouse.h>
+#include <ois/OISJoyStick.h>
 #include "util/Math.h"
 
Index: code/trunk/src/core/input/InputManager.cc
===================================================================
--- code/trunk/src/core/input/InputManager.cc	(revision 3084)
+++ code/trunk/src/core/input/InputManager.cc	(revision 3196)
@@ -38,30 +38,27 @@
 #include <climits>
 #include <cassert>
-
-#include "ois/OISException.h"
-#include "ois/OISInputManager.h"
-#include "core/ConsoleCommand.h"
-
-// HACK
-#ifdef ORXONOX_PLATFORM_LINUX
-#  include "ois/linux/LinuxMouse.h"
-#endif
-
+#include <ois/OISException.h>
+#include <ois/OISInputManager.h>
+
+#include "util/Convert.h"
 #include "util/Exception.h"
+#include "util/Debug.h"
 #include "core/Clock.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
-#include "core/CommandExecutor.h"
+#include "core/ConsoleCommand.h"
 #include "core/CommandLine.h"
-#include "util/Debug.h"
 
 #include "InputBuffer.h"
-#include "KeyBinder.h"
 #include "KeyDetector.h"
-#include "CalibratorCallback.h"
 #include "InputState.h"
 #include "SimpleInputState.h"
 #include "ExtendedInputState.h"
 #include "JoyStickDeviceNumberListener.h"
+
+// HACK (include this as last, X11 seems to define some macros...)
+#ifdef ORXONOX_PLATFORM_LINUX
+#  include <ois/linux/LinuxMouse.h>
+#endif
 
 namespace orxonox
@@ -367,6 +364,6 @@
         for (unsigned int i = 0; i < configValueVectorSize; ++i)
         {
-            list[i] = omni_cast<int>(ConfigFileManager::getInstance().getValue(
-                ConfigFileType::JoyStickCalibration, sectionName, valueName, i, omni_cast<std::string>(defaultValue), false));
+            list[i] = multi_cast<int>(ConfigFileManager::getInstance().getValue(
+                ConfigFileType::JoyStickCalibration, sectionName, valueName, i, multi_cast<std::string>(defaultValue), false));
         }
 
@@ -403,9 +400,9 @@
             // Generate some sort of execution unique id per joy stick
             std::string id = "JoyStick_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
             id += joySticks_[iJoyStick]->vendor();
             for (unsigned int i = 0; i < iJoyStick; ++i)
@@ -414,5 +411,5 @@
                 {
                     // Two joysticks are probably equal --> add the index as well
-                    id += "_" + omni_cast<std::string>(iJoyStick);
+                    id += "_" + multi_cast<std::string>(iJoyStick);
                 }
             }
@@ -497,5 +494,5 @@
                     joyStickMinValues_[iJoyStick][i] = -32768;
                 ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
-                    this->joyStickIDs_[iJoyStick], "MinValue", i, omni_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
+                    this->joyStickIDs_[iJoyStick], "MinValue", i, multi_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
 
                 // Maximum values
@@ -503,9 +500,9 @@
                     joyStickMaxValues_[iJoyStick][i] = 32767;
                 ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
-                    this->joyStickIDs_[iJoyStick], "MaxValue", i, omni_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
+                    this->joyStickIDs_[iJoyStick], "MaxValue", i, multi_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
 
                 // Middle values
                 ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
-                    this->joyStickIDs_[iJoyStick], "MiddleValue", i, omni_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
+                    this->joyStickIDs_[iJoyStick], "MiddleValue", i, multi_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
             }
         }
@@ -1169,5 +1166,5 @@
         else
         {
-            float fValue = value - joyStickCalibrations_[iJoyStick].middleValue[axis];
+            float fValue = static_cast<float>(value - joyStickCalibrations_[iJoyStick].middleValue[axis]);
             if (fValue > 0.0f)
                 fValue *= joyStickCalibrations_[iJoyStick].positiveCoeff[axis];
Index: code/trunk/src/core/input/InputManager.h
===================================================================
--- code/trunk/src/core/input/InputManager.h	(revision 3084)
+++ code/trunk/src/core/input/InputManager.h	(revision 3196)
@@ -40,6 +40,11 @@
 
 #include <map>
+#include <set>
+#include <string>
 #include <vector>
-#include <stack>
+#include <ois/OISKeyboard.h>
+#include <ois/OISMouse.h>
+#include <ois/OISJoyStick.h>
+
 #include "util/Math.h"
 #include "util/OrxEnum.h"
Index: code/trunk/src/core/input/InputState.h
===================================================================
--- code/trunk/src/core/input/InputState.h	(revision 3084)
+++ code/trunk/src/core/input/InputState.h	(revision 3196)
@@ -39,5 +39,4 @@
 #include <string>
 #include <vector>
-#include "core/Executor.h"
 #include "InputInterfaces.h"
 
@@ -63,6 +62,6 @@
         void resetHandlersChanged() { bHandlersChanged_ = false; }
 
-        virtual void onEnter() { if (executorOnEnter_) (*executorOnEnter_)(); }
-        virtual void onLeave() { if (executorOnLeave_) (*executorOnLeave_)(); }
+        virtual void onEnter() = 0;
+        virtual void onLeave() = 0;
 
         virtual void registerOnEnter(Executor* executor)      { executorOnEnter_ = executor; }
@@ -92,9 +91,9 @@
         InputState()
             : bHandlersChanged_(false)
+            , executorOnEnter_(0)
+            , executorOnLeave_(0)
             , priority_(0)
             , bAlwaysGetsInput_(false)
             , bTransparent_(false)
-            , executorOnEnter_(0)
-            , executorOnLeave_(0)
         { }
         virtual ~InputState() { }
@@ -108,4 +107,6 @@
 
         bool bHandlersChanged_;
+        Executor*                                   executorOnEnter_;
+        Executor*                                   executorOnLeave_;
 
     private:
@@ -123,7 +124,4 @@
         bool                                        bAlwaysGetsInput_;
         bool                                        bTransparent_;
-
-        Executor*                                   executorOnEnter_;
-        Executor*                                   executorOnLeave_;
     };
 }
Index: code/trunk/src/core/input/KeyBinder.cc
===================================================================
--- code/trunk/src/core/input/KeyBinder.cc	(revision 3084)
+++ code/trunk/src/core/input/KeyBinder.cc	(revision 3196)
@@ -33,7 +33,4 @@
 
 #include "KeyBinder.h"
-
-#include <fstream>
-#include <string>
 
 #include "util/Convert.h"
@@ -320,5 +317,5 @@
                     {
                         mouseAxes_[2*i + 0].absVal_
-                            = -mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
+                            = -mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
                         mouseAxes_[2*i + 1].absVal_ = 0.0f;
                     }
@@ -327,5 +324,5 @@
                         mouseAxes_[2*i + 0].absVal_ = 0.0f;
                         mouseAxes_[2*i + 1].absVal_
-                            =  mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
+                            =  mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
                     }
                     else
Index: code/trunk/src/core/input/KeyBinder.h
===================================================================
--- code/trunk/src/core/input/KeyBinder.h	(revision 3084)
+++ code/trunk/src/core/input/KeyBinder.h	(revision 3196)
@@ -38,6 +38,7 @@
 #include "core/CorePrereqs.h"
 
+#include <cassert>
+#include <string>
 #include <vector>
-#include <cassert>
 
 #include "InputInterfaces.h"
Index: code/trunk/src/core/input/KeyDetector.cc
===================================================================
--- code/trunk/src/core/input/KeyDetector.cc	(revision 3084)
+++ code/trunk/src/core/input/KeyDetector.cc	(revision 3196)
@@ -34,9 +34,7 @@
 
 #include "KeyDetector.h"
+
 #include "util/Debug.h"
 #include "core/CoreIncludes.h"
-#include "core/CommandExecutor.h"
-#include "core/CommandEvaluation.h"
-#include "InputCommands.h"
 #include "Button.h"
 
Index: code/trunk/src/core/input/KeyDetector.h
===================================================================
--- code/trunk/src/core/input/KeyDetector.h	(revision 3084)
+++ code/trunk/src/core/input/KeyDetector.h	(revision 3196)
@@ -38,4 +38,5 @@
 #include "core/CorePrereqs.h"
 
+#include <string>
 #include "KeyBinder.h"
 
Index: code/trunk/src/core/input/SimpleInputState.cc
===================================================================
--- code/trunk/src/core/input/SimpleInputState.cc	(revision 3084)
+++ code/trunk/src/core/input/SimpleInputState.cc	(revision 3196)
@@ -34,4 +34,5 @@
 
 #include "SimpleInputState.h"
+#include "core/Executor.h"
 
 namespace orxonox
@@ -148,3 +149,15 @@
         bHandlersChanged_ = true;
     }
+
+    void SimpleInputState::onEnter()
+    {
+        if (executorOnEnter_)
+            (*executorOnEnter_)();
+    }
+
+    void SimpleInputState::onLeave()
+    {
+        if (executorOnLeave_)
+            (*executorOnLeave_)();
+    }
 }
Index: code/trunk/src/core/input/SimpleInputState.h
===================================================================
--- code/trunk/src/core/input/SimpleInputState.h	(revision 3084)
+++ code/trunk/src/core/input/SimpleInputState.h	(revision 3196)
@@ -79,4 +79,7 @@
         void update();
         void numberOfJoySticksChanged(unsigned int n);
+
+        void onEnter();
+        void onLeave();
 
         KeyHandler*                   keyHandler_;
