Index: code/trunk/src/orxonox/gamestates/GSClient.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSClient.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSClient.cc	(revision 3280)
@@ -38,10 +38,10 @@
 namespace orxonox
 {
-    AddGameState(GSClient, "client");
+    DeclareGameState(GSClient, "client", false, true);
 
-    SetCommandLineArgument(ip, "127.0.0.1").information("#.#.#.#");
+    SetCommandLineArgument(ip, "127.0.0.1").information("Sever IP as strin in the form #.#.#.#");
 
-    GSClient::GSClient(const std::string& name)
-        : GameState(name)
+    GSClient::GSClient(const GameStateConstrParams& params)
+        : GameState(params)
         , client_(0)
     {
Index: code/trunk/src/orxonox/gamestates/GSClient.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSClient.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSClient.h	(revision 3280)
@@ -40,5 +40,5 @@
     {
     public:
-        GSClient(const std::string& name);
+        GSClient(const GameStateConstrParams& params);
         ~GSClient();
 
Index: code/trunk/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSDedicated.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSDedicated.cc	(revision 3280)
@@ -51,10 +51,10 @@
     const unsigned int MAX_COMMAND_LENGTH = 255;
     
-    AddGameState(GSDedicated, "dedicated");
+    DeclareGameState(GSDedicated, "dedicated", false, false);
     
     termios* GSDedicated::originalTerminalSettings_;
 
-    GSDedicated::GSDedicated(const std::string& name)
-        : GameState(name)
+    GSDedicated::GSDedicated(const GameStateConstrParams& params)
+        : GameState(params)
         , server_(0)
         , timeSinceLastUpdate_(0)
Index: code/trunk/src/orxonox/gamestates/GSDedicated.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSDedicated.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSDedicated.h	(revision 3280)
@@ -48,5 +48,5 @@
     {
     public:
-        GSDedicated(const std::string& name);
+        GSDedicated(const GameStateConstrParams& params);
         ~GSDedicated();
 
Index: code/trunk/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 3280)
@@ -57,8 +57,8 @@
 namespace orxonox
 {
-    AddGameState(GSGraphics, "graphics", false);
-
-    GSGraphics::GSGraphics(const std::string& name, bool countTickTime)
-        : GameState(name, countTickTime)
+    DeclareGameState(GSGraphics, "graphics", true, true);
+
+    GSGraphics::GSGraphics(const GameStateConstrParams& params)
+        : GameState(params)
         , inputManager_(0)
         , console_(0)
@@ -108,7 +108,6 @@
         setConfigValues();
 
-        // initialise graphics manager. Doesn't load the render window yet!
+        // Load OGRE including the render window
         this->graphicsManager_ = new GraphicsManager();
-        this->graphicsManager_->initialise();
 
         // load debug overlay
@@ -198,5 +197,5 @@
     void GSGraphics::toggleGUI()
     {
-            GUIManager::getInstance().executeCode("toggleGUI()");
+        GUIManager::getInstance().executeCode("toggleGUI()");
     }
 
Index: code/trunk/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 3280)
@@ -52,5 +52,5 @@
     {
     public:
-        GSGraphics(const std::string& name, bool countTickTime);
+        GSGraphics(const GameStateConstrParams& params);
         ~GSGraphics();
         void setConfigValues();
Index: code/trunk/src/orxonox/gamestates/GSIOConsole.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSIOConsole.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSIOConsole.cc	(revision 3280)
@@ -36,8 +36,8 @@
 namespace orxonox
 {
-    AddGameState(GSIOConsole, "ioConsole");
+    DeclareGameState(GSIOConsole, "ioConsole", false, false);
 
-    GSIOConsole::GSIOConsole(const std::string& name)
-        : GameState(name)
+    GSIOConsole::GSIOConsole(const GameStateConstrParams& params)
+        : GameState(params)
     {
     }
Index: code/trunk/src/orxonox/gamestates/GSIOConsole.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSIOConsole.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSIOConsole.h	(revision 3280)
@@ -38,5 +38,5 @@
     {
     public:
-        GSIOConsole(const std::string& name);
+        GSIOConsole(const GameStateConstrParams& params);
         ~GSIOConsole();
 
Index: code/trunk/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 3280)
@@ -34,5 +34,4 @@
 #include "core/input/KeyBinder.h"
 #include "core/Clock.h"
-#include "core/CommandLine.h"
 #include "core/ConsoleCommand.h"
 #include "core/ConfigValueIncludes.h"
@@ -56,13 +55,11 @@
 namespace orxonox
 {
-    AddGameState(GSLevel, "level");
-
-    SetCommandLineArgument(level, "").shortcut("l");
+    DeclareGameState(GSLevel, "level", false, true);
     SetConsoleCommand(GSLevel, showIngameGUI, true);
 
     XMLFile* GSLevel::startFile_s = NULL;
 
-    GSLevel::GSLevel(const std::string& name)
-        : GameState(name)
+    GSLevel::GSLevel(const GameStateConstrParams& params)
+        : GameState(params)
         , keyBinder_(0)
         , gameInputState_(0)
@@ -71,5 +68,4 @@
         , radar_(0)
         , cameraManager_(0)
-        , levelManager_(0)
     {
         RegisterObject(GSLevel);
@@ -120,7 +116,4 @@
         if (GameMode::isMaster())
         {
-            // create the global LevelManager
-            this->levelManager_ = new LevelManager();
-
             this->loadLevel();
         }
@@ -202,10 +195,4 @@
         }
 
-        if (this->levelManager_)
-        {
-            delete this->levelManager_;
-            this->levelManager_ = 0;
-        }
-
         if (this->playerManager_)
         {
@@ -252,10 +239,5 @@
         // call the loader
         COUT(0) << "Loading level..." << std::endl;
-        std::string levelName;
-        CommandLine::getValue("level", &levelName);
-        if (levelName == "")
-            startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + Game::getInstance().getLevel());
-        else
-            startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName);
+        startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + LevelManager::getInstance().getDefaultLevel());
         Loader::open(startFile_s);
     }
Index: code/trunk/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 3280)
@@ -41,5 +41,5 @@
     {
     public:
-        GSLevel(const std::string& name);
+        GSLevel(const GameStateConstrParams& params);
         ~GSLevel();
         void setConfigValues();
@@ -68,5 +68,4 @@
         Radar*                radar_;                   //!< represents the Radar (not the HUD part)
         CameraManager*        cameraManager_;           //!< camera manager for this level
-        LevelManager*         levelManager_;            //!< global level manager
         PlayerManager*        playerManager_;           //!< player manager for this level
         QuestManager*         questManager_;
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 3280)
@@ -43,8 +43,8 @@
 namespace orxonox
 {
-    AddGameState(GSMainMenu, "mainMenu");
+    DeclareGameState(GSMainMenu, "mainMenu", false, true);
 
-    GSMainMenu::GSMainMenu(const std::string& name)
-        : GameState(name)
+    GSMainMenu::GSMainMenu(const GameStateConstrParams& params)
+        : GameState(params)
         , inputState_(0)
     {
@@ -67,5 +67,5 @@
 
         // show main menu
-        GUIManager::getInstance().showGUI("mainmenu_2");
+        GUIManager::getInstance().showGUI("mainmenu_3");
         GUIManager::getInstance().setCamera(this->camera_);
         GraphicsManager::getInstance().setCamera(this->camera_);
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 3280)
@@ -40,5 +40,5 @@
     {
     public:
-        GSMainMenu(const std::string& name);
+        GSMainMenu(const GameStateConstrParams& params);
         ~GSMainMenu();
 
Index: code/trunk/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSRoot.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSRoot.cc	(revision 3280)
@@ -37,17 +37,18 @@
 #include "interfaces/TimeFactorListener.h"
 #include "interfaces/Tickable.h"
+#include "LevelManager.h"
 
 namespace orxonox
 {
-    AddGameState(GSRoot, "root", false);
-    SetCommandLineSwitch(console);
+    DeclareGameState(GSRoot, "root", true, false);
+    SetCommandLineSwitch(console).information("Start in console mode (text IO only)");
     // Shortcuts for easy direct loading
-    SetCommandLineSwitch(server);
-    SetCommandLineSwitch(client);
-    SetCommandLineSwitch(dedicated);
-    SetCommandLineSwitch(standalone);
-
-    GSRoot::GSRoot(const std::string& name, bool countTickTime)
-        : GameState(name, countTickTime)
+    SetCommandLineSwitch(server).information("Start in server mode");
+    SetCommandLineSwitch(client).information("Start in client mode");
+    SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");
+    SetCommandLineSwitch(standalone).information("Start in standalone mode");
+
+    GSRoot::GSRoot(const GameStateConstrParams& params)
+        : GameState(params)
         , timeFactor_(1.0f)
         , bPaused_(false)
@@ -83,4 +84,7 @@
         }
 
+        // create the global LevelManager
+        this->levelManager_ = new LevelManager();
+
         // Load level directly?
         bool loadLevel = false;
@@ -129,4 +133,6 @@
         }
 */
+
+        delete this->levelManager_;
     }
 
Index: code/trunk/src/orxonox/gamestates/GSRoot.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSRoot.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSRoot.h	(revision 3280)
@@ -38,5 +38,5 @@
     {
     public:
-        GSRoot(const std::string& name, bool countTickTime);
+        GSRoot(const GameStateConstrParams& params);
         ~GSRoot();
 
@@ -52,7 +52,9 @@
 
     private:
-        float                 timeFactor_;       //!< A factor that sets the gamespeed. 1 is normal.
+        float                 timeFactor_;              //!< A factor that sets the gamespeed. 1 is normal.
         bool                  bPaused_;
         float                 timeFactorPauseBackup_;
+
+        LevelManager*         levelManager_;            //!< global level manager
 
         // console commands
Index: code/trunk/src/orxonox/gamestates/GSServer.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSServer.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSServer.cc	(revision 3280)
@@ -37,10 +37,10 @@
 namespace orxonox
 {
-    AddGameState(GSServer, "server");
+    DeclareGameState(GSServer, "server", false, true);
 
-    SetCommandLineArgument(port, 55556).shortcut("p").information("0-65535");
+    SetCommandLineArgument(port, 55556).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)");
 
-    GSServer::GSServer(const std::string& name)
-        : GameState(name)
+    GSServer::GSServer(const GameStateConstrParams& params)
+        : GameState(params)
         , server_(0)
     {
Index: code/trunk/src/orxonox/gamestates/GSServer.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSServer.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSServer.h	(revision 3280)
@@ -40,5 +40,5 @@
     {
     public:
-        GSServer(const std::string& name);
+        GSServer(const GameStateConstrParams& params);
         ~GSServer();
 
Index: code/trunk/src/orxonox/gamestates/GSStandalone.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSStandalone.cc	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSStandalone.cc	(revision 3280)
@@ -34,8 +34,8 @@
 namespace orxonox
 {
-    AddGameState(GSStandalone, "standalone");
+    DeclareGameState(GSStandalone, "standalone", false, true);
 
-    GSStandalone::GSStandalone(const std::string& name)
-        : GameState(name)
+    GSStandalone::GSStandalone(const GameStateConstrParams& params)
+        : GameState(params)
     {
     }
Index: code/trunk/src/orxonox/gamestates/GSStandalone.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSStandalone.h	(revision 3205)
+++ code/trunk/src/orxonox/gamestates/GSStandalone.h	(revision 3280)
@@ -38,5 +38,5 @@
     {
     public:
-        GSStandalone(const std::string& name);
+        GSStandalone(const GameStateConstrParams& params);
         ~GSStandalone();
 
