Index: code/branches/gui/src/core/input/ExtendedInputState.cc
===================================================================
--- code/branches/gui/src/core/input/ExtendedInputState.cc	(revision 1652)
+++ code/branches/gui/src/core/input/ExtendedInputState.cc	(revision 1653)
@@ -37,16 +37,8 @@
 #include <assert.h>
 #include "core/Debug.h"
-#include "core/CoreIncludes.h"
 
 namespace orxonox
 {
-    CreateFactory(ExtendedInputState);
-
     using namespace InputDevice;
-
-    ExtendedInputState::ExtendedInputState()
-    {
-        RegisterObject(ExtendedInputState);
-    }
 
     void ExtendedInputState::numberOfJoySticksChanged(unsigned int n)
Index: code/branches/gui/src/core/input/ExtendedInputState.h
===================================================================
--- code/branches/gui/src/core/input/ExtendedInputState.h	(revision 1652)
+++ code/branches/gui/src/core/input/ExtendedInputState.h	(revision 1653)
@@ -48,5 +48,4 @@
     {
         friend class InputManager;
-        friend class ClassFactory<ExtendedInputState>;
 
     public:
@@ -68,5 +67,5 @@
 
     private:
-        ExtendedInputState();
+        ExtendedInputState() { }
         ~ExtendedInputState() { }
 
Index: code/branches/gui/src/core/input/InputManager.cc
===================================================================
--- code/branches/gui/src/core/input/InputManager.cc	(revision 1652)
+++ code/branches/gui/src/core/input/InputManager.cc	(revision 1653)
@@ -161,14 +161,14 @@
             setConfigValues();
 
-            stateEmpty_ = createSimpleInputState("empty", -1);
+            stateEmpty_ = createInputState<SimpleInputState>("empty", -1);
             stateEmpty_->setHandler(new EmptyHandler());
             activeStates_[stateEmpty_->getPriority()] = stateEmpty_;
 
-            stateDetector_ = createSimpleInputState("detector", 101);
+            stateDetector_ = createInputState<SimpleInputState>("detector", 101);
             KeyDetector* temp = new KeyDetector();
             temp->loadBindings("storeKeyStroke");
             stateDetector_->setHandler(temp);
 
-            stateCalibrator_ = createSimpleInputState("calibrator", 100);
+            stateCalibrator_ = createInputState<SimpleInputState>("calibrator", 100);
             stateCalibrator_->setHandler(new EmptyHandler());
             InputBuffer* buffer = new InputBuffer();
@@ -1037,54 +1037,4 @@
     /**
     @brief
-        Returns a new SimpleInputState and configures it first.
-    */
-    SimpleInputState* InputManager::createSimpleInputState(const std::string &name, int priority)
-    {
-        SimpleInputState* state = new SimpleInputState();
-        if (_configureInputState(state, name, priority))
-            return state;
-        else
-        {
-            delete state;
-            return 0;
-        }
-    }
-
-    /**
-    @brief
-        Returns a new ExtendedInputState and configures it first.
-    */
-    ExtendedInputState* InputManager::createExtendedInputState(const std::string &name, int priority)
-    {
-        ExtendedInputState* state = new ExtendedInputState();
-        if (_configureInputState(state, name, priority))
-            return state;
-        else
-        {
-            delete state;
-            return 0;
-        }
-    }
-
-    /**
-    @brief
-        Returns a new InputState of type 'type' and configures it first.
-    @param type
-        String name of the class (used by the factory)
-    */
-    InputState* InputManager::createInputState(const std::string& type, const std::string &name, int priority)
-    {
-        InputState* state = dynamic_cast<InputState*>(Factory::getIdentifier(type)->fabricate());
-        if (_configureInputState(state, name, priority))
-            return state;
-        else
-        {
-            delete state;
-            return 0;
-        }
-    }
-
-    /**
-    @brief
         Removes an input state internally.
     @param name
Index: code/branches/gui/src/core/input/InputManager.h
===================================================================
--- code/branches/gui/src/core/input/InputManager.h	(revision 1652)
+++ code/branches/gui/src/core/input/InputManager.h	(revision 1653)
@@ -102,7 +102,17 @@
         void setWindowExtents(const int width, const int height);
 
-        SimpleInputState*   createSimpleInputState  (const std::string& name, int priority);
-        ExtendedInputState* createExtendedInputState(const std::string& name, int priority);
-        InputState*         createInputState(const std::string& type, const std::string &name, int priority);
+        template <class T>
+        T* createInputState(const std::string& name, int priority)
+        {
+            T* state = new T;
+            if (_configureInputState(state, name, priority))
+                return state;
+            else
+            {
+                delete state;
+                return 0;
+            }
+        }
+
         bool destroyState          (const std::string& name);
         InputState* getState       (const std::string& name);
Index: code/branches/gui/src/core/input/InputState.h
===================================================================
--- code/branches/gui/src/core/input/InputState.h	(revision 1652)
+++ code/branches/gui/src/core/input/InputState.h	(revision 1653)
@@ -40,11 +40,9 @@
 #include <vector>
 #include "core/Executor.h"
-#include "core/BaseObject.h"
-#include "core/CoreIncludes.h"
 #include "InputInterfaces.h"
 
 namespace orxonox
 {
-    class _CoreExport InputState : public BaseObject
+    class _CoreExport InputState
     {
         friend class InputManager;
@@ -89,6 +87,5 @@
 
     protected:
-        InputState() : priority_(0), executorOnEnter_(0), executorOnLeave_(0)
-        { RegisterObject(InputState); }
+        InputState() : priority_(0), executorOnEnter_(0), executorOnLeave_(0) { }
         virtual ~InputState() { }
 
Index: code/branches/gui/src/core/input/KeyDetector.cc
===================================================================
--- code/branches/gui/src/core/input/KeyDetector.cc	(revision 1652)
+++ code/branches/gui/src/core/input/KeyDetector.cc	(revision 1653)
@@ -68,7 +68,7 @@
     void KeyDetector::loadBindings(const std::string& command)
     {
+        this->command_ = command;
         clearBindings();
         setConfigValues();
-        this->command_ = command;
     }
 
Index: code/branches/gui/src/core/input/SimpleInputState.cc
===================================================================
--- code/branches/gui/src/core/input/SimpleInputState.cc	(revision 1652)
+++ code/branches/gui/src/core/input/SimpleInputState.cc	(revision 1653)
@@ -38,10 +38,7 @@
 #include "core/Debug.h"
 #include "core/Executor.h"
-#include "core/CoreIncludes.h"
 
 namespace orxonox
 {
-    CreateFactory(SimpleInputState);
-
     using namespace InputDevice;
 
@@ -51,5 +48,4 @@
         , joyStickHandlerAll_(0)
     {
-        RegisterObject(SimpleInputState);
     }
 
Index: code/branches/gui/src/core/input/SimpleInputState.h
===================================================================
--- code/branches/gui/src/core/input/SimpleInputState.h	(revision 1652)
+++ code/branches/gui/src/core/input/SimpleInputState.h	(revision 1653)
@@ -46,5 +46,4 @@
     {
         friend class InputManager;
-        friend class ClassFactory<SimpleInputState>;
 
     public:
