Index: /code/branches/core7/src/libraries/core/Core.cc
===================================================================
--- /code/branches/core7/src/libraries/core/Core.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/Core.cc	(revision 10484)
@@ -250,5 +250,5 @@
         safeObjectDelete(&languageInstance_);
         safeObjectDelete(&configFileManager_);
-        ConsoleCommandManager::destroyAll();
+        ConsoleCommandManager::getInstance().destroyAll();
         Context::setRootContext(NULL);
         IdentifierManager::getInstance().destroyAllIdentifiers();
Index: /code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- /code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10484)
@@ -99,5 +99,5 @@
 
                 // get all the groups that are visible (except the shortcut group "")
-                const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommandManager::getCommands();
+                const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommandManager::getInstance().getCommands();
                 for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
                     if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find(fragmentLC) == 0))
@@ -138,11 +138,11 @@
 
                 // find the iterator of the given group
-                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommands().begin();
-                for ( ; it_group != ConsoleCommandManager::getCommands().end(); ++it_group)
+                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommands().begin();
+                for ( ; it_group != ConsoleCommandManager::getInstance().getCommands().end(); ++it_group)
                     if (getLowercase(it_group->first) == groupLC)
                         break;
 
                 // add all commands in the group to the list
-                if (it_group != ConsoleCommandManager::getCommands().end())
+                if (it_group != ConsoleCommandManager::getInstance().getCommands().end())
                 {
                     for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
@@ -207,11 +207,11 @@
                 return detail::_groupsandcommands(fragment, true);
 
-            if (ConsoleCommandManager::getCommandLC(getLowercase(tokens[0])))
+            if (ConsoleCommandManager::getInstance().getCommandLC(getLowercase(tokens[0])))
                 return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment);
 
             if (tokens.size() == 1)
             {
-                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommands().find(tokens[0]);
-                if (it_group != ConsoleCommandManager::getCommands().end())
+                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommands().find(tokens[0]);
+                if (it_group != ConsoleCommandManager::getInstance().getCommands().end())
                     return detail::_subcommands(fragment, tokens[0], true);
                 else
@@ -219,5 +219,5 @@
             }
 
-            if (ConsoleCommandManager::getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))
+            if (ConsoleCommandManager::getInstance().getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))
                 return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment);
 
Index: /code/branches/core7/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- /code/branches/core7/src/libraries/core/command/CommandEvaluation.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/CommandEvaluation.cc	(revision 10484)
@@ -306,5 +306,5 @@
                 // the user typed 1-2 arguments, check what he tried to type and print a suitable error
                 std::string groupLC = getLowercase(this->getToken(0));
-                for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommandsLC().begin(); it_group != ConsoleCommandManager::getCommandsLC().end(); ++it_group)
+                for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group)
                     if (it_group->first == groupLC)
                         return std::string("Error: There is no command in group \"") + this->getToken(0) + "\" starting with \"" + this->getToken(1) + "\".";
@@ -328,5 +328,5 @@
 
         // iterate through all groups and their commands and calculate the distance to the current command. keep the best.
-        for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommandsLC().begin(); it_group != ConsoleCommandManager::getCommandsLC().end(); ++it_group)
+        for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group)
         {
             if (it_group->first != "")
@@ -346,6 +346,6 @@
 
         // now also iterate through all shortcuts and keep the best if it's better than the one found above.
-        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommandsLC().find("");
-        if (it_group !=  ConsoleCommandManager::getCommandsLC().end())
+        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().find("");
+        if (it_group !=  ConsoleCommandManager::getInstance().getCommandsLC().end())
         {
             for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); ++it_name)
Index: /code/branches/core7/src/libraries/core/command/CommandExecutor.cc
===================================================================
--- /code/branches/core7/src/libraries/core/command/CommandExecutor.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/CommandExecutor.cc	(revision 10484)
@@ -155,5 +155,5 @@
 
         // assign the fallback-command to get hints about the possible commands and groups
-        evaluation.hintCommand_ = ConsoleCommandManager::getCommand(__CC_CommandExecutor_name, __CC_autocomplete_name);
+        evaluation.hintCommand_ = ConsoleCommandManager::getInstance().getCommand(__CC_CommandExecutor_name, __CC_autocomplete_name);
 
         // check if there's at least one argument
@@ -161,5 +161,5 @@
         {
             // try to get a command from the first token
-            evaluation.execCommand_ = ConsoleCommandManager::getCommandLC(evaluation.getToken(0));
+            evaluation.execCommand_ = ConsoleCommandManager::getInstance().getCommandLC(evaluation.getToken(0));
             if (evaluation.execCommand_)
                 evaluation.execArgumentsOffset_ = 1;
@@ -167,5 +167,5 @@
             {
                 // try to get a command from the first two tokens
-                evaluation.execCommand_ = ConsoleCommandManager::getCommandLC(evaluation.getToken(0), evaluation.getToken(1));
+                evaluation.execCommand_ = ConsoleCommandManager::getInstance().getCommandLC(evaluation.getToken(0), evaluation.getToken(1));
                 if (evaluation.execCommand_)
                     evaluation.execArgumentsOffset_ = 2;
@@ -288,5 +288,5 @@
 
             // check if the alias already exists - print an error and return if it does
-            if ((tokens.size() == 1 && ConsoleCommandManager::getCommand(tokens[0])) || (tokens.size() == 2 && ConsoleCommandManager::getCommand(tokens[0], tokens[1])))
+            if ((tokens.size() == 1 && ConsoleCommandManager::getInstance().getCommand(tokens[0])) || (tokens.size() == 2 && ConsoleCommandManager::getInstance().getCommand(tokens[0], tokens[1])))
             {
                 orxout(user_error) << "A command with name \"" << alias << "\" already exists." << endl;
@@ -296,7 +296,7 @@
             // create a new console command with the given alias as its name
             if (tokens.size() == 1)
-                ConsoleCommandManager::registerCommand(new ConsoleCommand(tokens[0], executor));
+                ConsoleCommandManager::getInstance().registerCommand(new ConsoleCommand(tokens[0], executor));
             else if (tokens.size() == 2)
-                ConsoleCommandManager::registerCommand(new ConsoleCommand(tokens[0], tokens[1], executor));
+                ConsoleCommandManager::getInstance().registerCommand(new ConsoleCommand(tokens[0], tokens[1], executor));
             else
                 orxout(user_error) << "\"" << alias << "\" is not a valid alias name (must have one or two words)." << endl;
Index: /code/branches/core7/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- /code/branches/core7/src/libraries/core/command/ConsoleCommand.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/ConsoleCommand.cc	(revision 10484)
@@ -92,5 +92,5 @@
     ConsoleCommand::~ConsoleCommand()
     {
-        ConsoleCommandManager::unregisterCommand(this);
+        ConsoleCommandManager::getInstance().unregisterCommand(this);
     }
 
Index: /code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.cc
===================================================================
--- /code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.cc	(revision 10484)
@@ -35,10 +35,10 @@
     void StaticallyInitializedConsoleCommand::load()
     {
-        ConsoleCommandManager::registerCommand(this->command_);
+        ConsoleCommandManager::getInstance().registerCommand(this->command_);
     }
 
     void StaticallyInitializedConsoleCommand::unload()
     {
-        ConsoleCommandManager::unregisterCommand(this->command_);
+        ConsoleCommandManager::getInstance().unregisterCommand(this->command_);
     }
 }
Index: /code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
===================================================================
--- /code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h	(revision 10484)
@@ -332,5 +332,5 @@
     */
     inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& name)
-        { return ConsoleCommandManager::getCommand(name, true); }
+        { return ConsoleCommandManager::getInstance().getCommand(name, true); }
     /**
         @brief Returns a manipulator for a command with the given group and name.
@@ -341,5 +341,5 @@
     */
     inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& group, const std::string& name)
-        { return ConsoleCommandManager::getCommand(group, name, true); }
+        { return ConsoleCommandManager::getInstance().getCommand(group, name, true); }
 }
 
Index: /code/branches/core7/src/libraries/core/command/ConsoleCommandManager.cc
===================================================================
--- /code/branches/core7/src/libraries/core/command/ConsoleCommandManager.cc	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/ConsoleCommandManager.cc	(revision 10484)
@@ -39,4 +39,10 @@
 namespace orxonox
 {
+    /* static */ ConsoleCommandManager& ConsoleCommandManager::getInstance()
+    {
+        static ConsoleCommandManager instance;
+        return instance;
+    }
+
     /**
         @brief Returns the command with given group an name.
@@ -45,9 +51,9 @@
         @param bPrintError If true, an error is printed if the command doesn't exist
     */
-    /* static */ ConsoleCommand* ConsoleCommandManager::getCommand(const std::string& group, const std::string& name, bool bPrintError)
+    ConsoleCommand* ConsoleCommandManager::getCommand(const std::string& group, const std::string& name, bool bPrintError)
     {
         // find the group
-        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommandMap().find(group);
-        if (it_group != ConsoleCommandManager::getCommandMap().end())
+        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = this->commandMap_.find(group);
+        if (it_group != this->commandMap_.end())
         {
             // find the name
@@ -75,5 +81,5 @@
         @param bPrintError If true, an error is printed if the command doesn't exist
     */
-    /* static */ ConsoleCommand* ConsoleCommandManager::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
+    ConsoleCommand* ConsoleCommandManager::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
     {
         std::string groupLC = getLowercase(group);
@@ -81,6 +87,6 @@
 
         // find the group
-        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommandMapLC().find(groupLC);
-        if (it_group != ConsoleCommandManager::getCommandMapLC().end())
+        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = this->commandMapLC_.find(groupLC);
+        if (it_group != this->commandMapLC_.end())
         {
             // find the name
@@ -103,30 +109,12 @@
 
     /**
-        @brief Returns the static map that stores all console commands.
-    */
-    /* static */ std::map<std::string, std::map<std::string, ConsoleCommand*> >& ConsoleCommandManager::getCommandMap()
-    {
-        static std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMap;
-        return commandMap;
-    }
-
-    /**
-        @brief Returns the static map that stores all console commands in lowercase.
-    */
-    /* static */ std::map<std::string, std::map<std::string, ConsoleCommand*> >& ConsoleCommandManager::getCommandMapLC()
-    {
-        static std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMapLC;
-        return commandMapLC;
-    }
-
-    /**
         @brief Registers a new command with the groups and names that are defined by ConsoleCommand::getNames().
     */
-    /* static */ void ConsoleCommandManager::registerCommand(ConsoleCommand* command)
+    void ConsoleCommandManager::registerCommand(ConsoleCommand* command)
     {
         for (size_t i = 0; i < command->getNames().size(); ++i)
         {
             const ConsoleCommand::CommandName& name = command->getNames()[i];
-            ConsoleCommandManager::registerCommand(name.group_, name.name_, command);
+            this->registerCommand(name.group_, name.name_, command);
         }
     }
@@ -135,5 +123,5 @@
         @brief Registers a new command with given group an name by adding it to the command map.
     */
-    /* static */ void ConsoleCommandManager::registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command)
+    void ConsoleCommandManager::registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command)
     {
         if (name == "")
@@ -141,5 +129,5 @@
 
         // check if a command with this name already exists
-        if (ConsoleCommandManager::getCommand(group, name) != 0)
+        if (this->getCommand(group, name) != 0)
         {
             if (group == "")
@@ -151,6 +139,6 @@
         {
             // add the command to the map
-            ConsoleCommandManager::getCommandMap()[group][name] = command;
-            ConsoleCommandManager::getCommandMapLC()[getLowercase(group)][getLowercase(name)] = command;
+            this->commandMap_[group][name] = command;
+            this->commandMapLC_[getLowercase(group)][getLowercase(name)] = command;
         }
     }
@@ -159,8 +147,8 @@
         @brief Removes the command from the command map.
     */
-    /* static */ void ConsoleCommandManager::unregisterCommand(ConsoleCommand* command)
+    void ConsoleCommandManager::unregisterCommand(ConsoleCommand* command)
     {
         // iterate through all groups
-        for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = ConsoleCommandManager::getCommandMap().begin(); it_group != ConsoleCommandManager::getCommandMap().end(); )
+        for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = this->commandMap_.begin(); it_group != this->commandMap_.end(); )
         {
             // iterate through all commands of each group
@@ -176,5 +164,5 @@
             // erase the group if it is empty now
             if (it_group->second.empty())
-                ConsoleCommandManager::getCommandMap().erase(it_group++);
+                this->commandMap_.erase(it_group++);
             else
                 ++it_group;
@@ -184,5 +172,5 @@
 
         // iterate through all groups
-        for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = ConsoleCommandManager::getCommandMapLC().begin(); it_group != ConsoleCommandManager::getCommandMapLC().end(); )
+        for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = this->commandMapLC_.begin(); it_group != this->commandMapLC_.end(); )
         {
             // iterate through all commands of each group
@@ -198,5 +186,5 @@
             // erase the group if it is empty now
             if (it_group->second.empty())
-                ConsoleCommandManager::getCommandMapLC().erase(it_group++);
+                this->commandMapLC_.erase(it_group++);
             else
                 ++it_group;
@@ -207,9 +195,9 @@
         @brief Deletes all commands
     */
-    /* static */ void ConsoleCommandManager::destroyAll()
+    void ConsoleCommandManager::destroyAll()
     {
         // delete entries until the map is empty
-        while (!ConsoleCommandManager::getCommandMap().empty() && !ConsoleCommandManager::getCommandMap().begin()->second.empty())
-            delete ConsoleCommandManager::getCommandMap().begin()->second.begin()->second;
+        while (!this->commandMap_.empty() && !this->commandMap_.begin()->second.empty())
+            delete this->commandMap_.begin()->second.begin()->second;
     }
 }
Index: /code/branches/core7/src/libraries/core/command/ConsoleCommandManager.h
===================================================================
--- /code/branches/core7/src/libraries/core/command/ConsoleCommandManager.h	(revision 10483)
+++ /code/branches/core7/src/libraries/core/command/ConsoleCommandManager.h	(revision 10484)
@@ -40,35 +40,37 @@
 {
     /**
-     * A static class that stores all existing ConsoleCommands.
+     * A singleton that stores all existing ConsoleCommands.
      */
     class _CoreExport ConsoleCommandManager
     {
         public:
-            static void registerCommand(ConsoleCommand* command);
-            static void registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command);
-            static void unregisterCommand(ConsoleCommand* command);
+            static ConsoleCommandManager& getInstance();
+
+            void registerCommand(ConsoleCommand* command);
+            void registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command);
+            void unregisterCommand(ConsoleCommand* command);
 
             /// Returns the map with all groups and commands.
-            static inline const std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommands()
-                { return ConsoleCommandManager::getCommandMap(); }
+            inline const std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommands()
+                { return this->commandMap_; }
             /// Returns the map with all groups and commands in lowercase.
-            static inline const std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandsLC()
-                { return ConsoleCommandManager::getCommandMapLC(); }
+            inline const std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandsLC()
+                { return this->commandMapLC_; }
 
             /// Returns a command (shortcut) with given name. @param name The name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist
-            static inline ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
-                { return ConsoleCommandManager::getCommand("", name, bPrintError); }
+            inline ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
+                { return this->getCommand("", name, bPrintError); }
             /// Returns a command (shortcut) with given name in lowercase. @param name The lowercase name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist
-            static inline ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
-                { return ConsoleCommandManager::getCommandLC("", name, bPrintError); }
+            inline ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
+                { return this->getCommandLC("", name, bPrintError); }
 
-            static ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
-            static ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
+            ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
+            ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
 
-            static void destroyAll();
+            void destroyAll();
 
         private:
-            static std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandMap();
-            static std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandMapLC();
+            std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMap_;
+            std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMapLC_;
     };
 }
