Index: code/branches/objecthierarchy/src/orxonox/Main.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/Main.cc	(revision 2086)
+++ code/branches/objecthierarchy/src/orxonox/Main.cc	(revision 2101)
@@ -42,4 +42,5 @@
 #include "util/SignalHandler.h"
 #include "core/ConfigFileManager.h"
+#include "core/CommandLine.h"
 
 #include "gamestates/GSRoot.h"
@@ -51,6 +52,4 @@
 #include "gamestates/GSGUI.h"
 #include "gamestates/GSIOConsole.h"
-
-using namespace orxonox;
 
 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
@@ -86,12 +85,28 @@
 //#endif
 
+SetCommandLineArgument(settingsFile, "orxonox.ini");
+
 int main(int argc, char** argv)
 {
+    using namespace orxonox;
+
     // create a signal handler (only works for linux)
     SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
 
-    // Specifiy config file before creating the GameStates in order to have
+    // Parse command line arguments
+    try
+    {
+        CommandLine::parseAll(argc, argv);
+    }
+    catch (ArgumentException& ex)
+    {
+        COUT(1) << ex.what() << std::endl;
+        COUT(0) << "Usage:" << std::endl << "orxonox " << CommandLine::getUsageInformation() << std::endl;
+    }
+
+    // Create the ConfigFileManager before creating the GameStates in order to have
     // setConfigValues() in the constructor (required).
-    ConfigFileManager::getInstance().setFile(CFT_Settings, "orxonox.ini");
+    ConfigFileManager* configFileManager = new ConfigFileManager();
+    configFileManager->setFilename(ConfigFileType::Settings, CommandLine::getValue("settingsFile").getString());
 
     // create the gamestates
@@ -115,5 +130,8 @@
 
     // Here happens the game
-    root.start(argc, argv);
+    root.start();
+
+    // Destroy ConfigFileManager again.
+    delete configFileManager;
 
     return 0;
Index: code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.cc	(revision 2086)
+++ code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.cc	(revision 2101)
@@ -93,14 +93,22 @@
     void GSGraphics::setConfigValues()
     {
-        SetConfigValue(resourceFile_, "resources.cfg").description("Location of the resources file in the data path.");
-        SetConfigValue(ogreConfigFile_,  "ogre.cfg").description("Location of the Ogre config file");
-        SetConfigValue(ogrePluginsFile_, "plugins.cfg").description("Location of the Ogre plugins file");
-        SetConfigValue(ogreLogFile_,     "ogre.log").description("Logfile for messages from Ogre. \
-                                                                 Use \"\" to suppress log file creation.");
-        SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
-        SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
-        SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
-        SetConfigValue(statisticsRefreshCycle_, 200000).description("Sets the time in microseconds interval at \
-                                                                    which average fps, etc. get updated.");
+        SetConfigValue(resourceFile_,    "resources.cfg")
+            .description("Location of the resources file in the data path.");
+        SetConfigValue(ogreConfigFile_,  "ogre.cfg")
+            .description("Location of the Ogre config file");
+        SetConfigValue(ogrePluginsFile_, "plugins.cfg")
+            .description("Location of the Ogre plugins file");
+        SetConfigValue(ogreLogFile_,     "ogre.log")
+            .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
+        SetConfigValue(ogreLogLevelTrivial_ , 5)
+            .description("Corresponding orxonox debug level for ogre Trivial");
+        SetConfigValue(ogreLogLevelNormal_  , 4)
+            .description("Corresponding orxonox debug level for ogre Normal");
+        SetConfigValue(ogreLogLevelCritical_, 2)
+            .description("Corresponding orxonox debug level for ogre Critical");
+        SetConfigValue(statisticsRefreshCycle_, 200000)
+            .description("Sets the time in microseconds interval at which average fps, etc. get updated.");
+        SetConfigValue(defaultMasterKeybindings_, "def_masterKeybindings.ini")
+            .description("Filename of default master keybindings.");
     }
 
@@ -136,7 +144,7 @@
         inputManager_->initialise(windowHnd, renderWindow_->getWidth(), renderWindow_->getHeight(), true);
         // Configure master input state with a KeyBinder
-        //masterKeyBinder_ = new KeyBinder();
-        //masterKeyBinder_->loadBindings("master_keybindings.ini");
-        //inputManager_->getMasterInputState()->addKeyHandler(masterKeyBinder_);
+        masterKeyBinder_ = new KeyBinder();
+        masterKeyBinder_->loadBindings("masterKeybindings.ini", defaultMasterKeybindings_);
+        inputManager_->getMasterInputState()->addKeyHandler(masterKeyBinder_);
 
         // Load the InGameConsole
@@ -172,5 +180,5 @@
 
         //inputManager_->getMasterInputState()->removeKeyHandler(this->masterKeyBinder_);
-        //delete this->masterKeyBinder_;
+        delete this->masterKeyBinder_;
         delete this->inputManager_;
 
Index: code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.h	(revision 2086)
+++ code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.h	(revision 2101)
@@ -103,12 +103,13 @@
 
         // config values
-        std::string           resourceFile_;          //!< resources file name
-        std::string           ogreConfigFile_;        //!< ogre config file name
-        std::string           ogrePluginsFile_;       //!< ogre plugins file name
-        std::string           ogreLogFile_;           //!< log file name for Ogre log messages
-        int                   ogreLogLevelTrivial_;   //!< Corresponding Orxonx debug level for LL_TRIVIAL
-        int                   ogreLogLevelNormal_;    //!< Corresponding Orxonx debug level for LL_NORMAL
-        int                   ogreLogLevelCritical_;  //!< Corresponding Orxonx debug level for LL_CRITICAL
-        unsigned int          detailLevelParticle_;   //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
+        std::string           resourceFile_;             //!< resources file name
+        std::string           ogreConfigFile_;           //!< ogre config file name
+        std::string           ogrePluginsFile_;          //!< ogre plugins file name
+        std::string           ogreLogFile_;              //!< log file name for Ogre log messages
+        int                   ogreLogLevelTrivial_;      //!< Corresponding Orxonx debug level for LL_TRIVIAL
+        int                   ogreLogLevelNormal_;       //!< Corresponding Orxonx debug level for LL_NORMAL
+        int                   ogreLogLevelCritical_;     //!< Corresponding Orxonx debug level for LL_CRITICAL
+        unsigned int          detailLevelParticle_;      //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
+        std::string           defaultMasterKeybindings_; //!< Filename of default master keybindings.
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc	(revision 2086)
+++ code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc	(revision 2101)
@@ -71,4 +71,6 @@
     {
         SetConfigValue(keyDetectorCallbackCode_, "KeybindBindingStringKeyName=");
+        SetConfigValue(defaultKeybindings_, "def_keybindings.ini")
+            .description("Filename of default keybindings.");
     }
 
@@ -79,5 +81,5 @@
             inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game", 20);
             keyBinder_ = new KeyBinder();
-            keyBinder_->loadBindings("keybindings.ini");
+            keyBinder_->loadBindings("keybindings.ini", defaultKeybindings_);
             inputState_->setHandler(keyBinder_);
 
Index: code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h	(revision 2086)
+++ code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h	(revision 2101)
@@ -71,6 +71,8 @@
         LevelManager*         levelManager_;
 
-        // config values
+        //##### ConfigValues #####
         std::string           keyDetectorCallbackCode_;
+        //! Filename of default keybindings.
+        std::string           defaultKeybindings_;
 
     private:
