Index: /code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc	(revision 697)
+++ /code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc	(revision 698)
@@ -36,7 +36,4 @@
 namespace orxonox
 {
-    std::list<std::string>* ConfigValueContainer::configFileLines_s = 0; // Set the static member variable configFileLines_s to zero
-    bool ConfigValueContainer::readConfigFile_s = false;                 // Set the static member variable readConfigFile_s to false
-
     /**
         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
@@ -438,5 +435,5 @@
     {
         // Read the file if needed
-        if (!ConfigValueContainer::readConfigFile_s)
+        if (!ConfigValueContainer::finishedReadingConfigFile())
             ConfigValueContainer::readConfigFile(CONFIGFILEPATH);
 
@@ -450,5 +447,5 @@
         bool success = false;
         std::list<std::string>::iterator it1;
-        for(it1 = ConfigValueContainer::configFileLines_s->begin(); it1 != ConfigValueContainer::configFileLines_s->end(); ++it1)
+        for(it1 = ConfigValueContainer::getConfigFileLines().begin(); it1 != ConfigValueContainer::getConfigFileLines().end(); ++it1)
         {
             // Don't try to parse comments
@@ -464,5 +461,5 @@
                 // Iterate through all lines in the section
                 std::list<std::string>::iterator it2;
-                for(it2 = ++it1; it2 != ConfigValueContainer::configFileLines_s->end(); ++it2)
+                for(it2 = ++it1; it2 != ConfigValueContainer::getConfigFileLines().end(); ++it2)
                 {
                     // Don't try to parse comments
@@ -495,5 +492,5 @@
                     {
                         // The next section startet, so our line isn't yet in the file - now we add it and safe the file
-                        this->configFileLine_ = this->configFileLines_s->insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
+                        this->configFileLine_ = this->getConfigFileLines().insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
                         ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
                         success = true;
@@ -515,5 +512,5 @@
                 {
                     // Looks like we found the right section, but the file ended without containing our variable - so we add it and safe the file
-                    this->configFileLine_ = this->configFileLines_s->insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
+                    this->configFileLine_ = this->getConfigFileLines().insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
                     ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
                     success = true;
@@ -527,9 +524,9 @@
         {
             // We obviously didn't found the right section, so we'll create it
-            this->configFileLines_s->push_back("[" + this->classname_ + "]");                   // Create the section
-            this->configFileLines_s->push_back(this->varname_ + "=" + this->defvalueString_);   // Create the line
-            this->configFileLine_ = --this->configFileLines_s->end();                           // Set the pointer to the last element
+            this->getConfigFileLines().push_back("[" + this->classname_ + "]");                   // Create the section
+            this->getConfigFileLines().push_back(this->varname_ + "=" + this->defvalueString_);   // Create the line
+            this->configFileLine_ = --this->getConfigFileLines().end();                           // Set the pointer to the last element
             success = true;
-            this->configFileLines_s->push_back("");                                             // Add an empty line - this is needed for the algorithm in the searchConfigFileLine-function
+            this->getConfigFileLines().push_back("");                                             // Add an empty line - this is needed for the algorithm in the searchConfigFileLine-function
             ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);                              // Save the changed config-file
         }
@@ -601,4 +598,30 @@
 
     /**
+        @returns a list, containing all entrys in the config-file.
+    */
+    std::list<std::string>& ConfigValueContainer::getConfigFileLines()
+    {
+        // This is done to avoid problems while executing this code before main()
+        static std::list<std::string> configFileLinesStaticReference = std::list<std::string>();
+        return configFileLinesStaticReference;
+    }
+
+    /**
+        @brief Returns true if the ConfigFile is read and stored into the ConfigFile-lines-list.
+        @param finished This is used to change the state
+        @return True if the ConfigFile is read and stored into the ConfigFile-lines-list
+    */
+    bool ConfigValueContainer::finishedReadingConfigFile(bool finished)
+    {
+        // This is done to avoid problems while executing this code before main()
+        static bool finishedReadingConfigFileStaticVariable = false;
+
+        if (finished)
+            finishedReadingConfigFileStaticVariable = true;
+
+        return finishedReadingConfigFileStaticVariable;
+    }
+
+    /**
         @brief Reads the config-file and stores the lines in a list.
         @param filename The name of the config-file
@@ -606,9 +629,5 @@
     void ConfigValueContainer::readConfigFile(const std::string& filename)
     {
-        ConfigValueContainer::readConfigFile_s = true;
-
-        // Create the list if needed
-        if (!ConfigValueContainer::configFileLines_s)
-            ConfigValueContainer::configFileLines_s = new std::list<std::string>;
+        ConfigValueContainer::finishedReadingConfigFile(true);
 
         // This creates the file if it's not existing
@@ -627,17 +646,17 @@
         {
             file.getline(line, 1024);
-            ConfigValueContainer::configFileLines_s->push_back(line);
+            ConfigValueContainer::getConfigFileLines().push_back(line);
 //            std::cout << "### ->" << line << "<- : empty: " << isEmpty(line) << " comment: " << isComment(line) << std::endl;
         }
 
         // The last line is useless
-        ConfigValueContainer::configFileLines_s->pop_back();
+        ConfigValueContainer::getConfigFileLines().pop_back();
 
         // Add an empty line to the end of the file if needed
         // this is needed for the algorithm in the searchConfigFileLine-function
-        if ((ConfigValueContainer::configFileLines_s->size() > 0) && !isEmpty(*ConfigValueContainer::configFileLines_s->rbegin()))
+        if ((ConfigValueContainer::getConfigFileLines().size() > 0) && !isEmpty(*ConfigValueContainer::getConfigFileLines().rbegin()))
         {
 //            std::cout << "### newline added" << std::endl;
-            ConfigValueContainer::configFileLines_s->push_back("");
+            ConfigValueContainer::getConfigFileLines().push_back("");
         }
 
@@ -652,5 +671,5 @@
     {
         // Make sure we stored the config-file in the list
-        if (!ConfigValueContainer::readConfigFile_s)
+        if (!ConfigValueContainer::finishedReadingConfigFile())
             ConfigValueContainer::readConfigFile(filename);
 
@@ -661,5 +680,5 @@
         // Iterate through the list an write the lines into the file
         std::list<std::string>::iterator it;
-        for(it = ConfigValueContainer::configFileLines_s->begin(); it != ConfigValueContainer::configFileLines_s->end(); ++it)
+        for(it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it)
         {
             file << (*it) << std::endl;
Index: /code/branches/FICN/src/orxonox/core/ConfigValueContainer.h
===================================================================
--- /code/branches/FICN/src/orxonox/core/ConfigValueContainer.h	(revision 697)
+++ /code/branches/FICN/src/orxonox/core/ConfigValueContainer.h	(revision 698)
@@ -86,4 +86,6 @@
             ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::ColourValue defvalue);
 
+            static std::list<std::string>& getConfigFileLines();
+            static bool finishedReadingConfigFile(bool finished = false);
             void setConfigFileEntyToDefault();
             void searchConfigFileLine();
@@ -143,6 +145,4 @@
 
             std::list<std::string>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
-            static std::list<std::string>* configFileLines_s;   //!< A list, containing all entrys in the config-file
-            static bool readConfigFile_s;                       //!< True if the config-file is read and stored in the list
 
             enum VariableType
Index: /code/branches/FICN/src/orxonox/core/Factory.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/Factory.cc	(revision 697)
+++ /code/branches/FICN/src/orxonox/core/Factory.cc	(revision 698)
@@ -104,6 +104,6 @@
     Factory* Factory::getFactoryPointer()
     {
-      static Factory theOneAndOnlyInstance = Factory();
-      return &theOneAndOnlyInstance;
+      static Factory theOneAndOnlyFactoryInstance = Factory();
+      return &theOneAndOnlyFactoryInstance;
     }
 }
Index: /code/branches/FICN/src/orxonox/core/Identifier.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/Identifier.cc	(revision 697)
+++ /code/branches/FICN/src/orxonox/core/Identifier.cc	(revision 698)
@@ -38,6 +38,5 @@
     // ###       Identifier        ###
     // ###############################
-    int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero
-    unsigned int Identifier::classIDcounter_s = 0;  // Set the static member variable classIDcounter_s to zero
+    int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero (this static member variable is ok: it's used in main(), not before)
 
     /**
@@ -50,5 +49,8 @@
 
         this->children_ = new IdentifierList;
-        this->classID_ = Identifier::classIDcounter_s++;
+
+        // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables
+        static unsigned int classIDcounter_s = 0;
+        this->classID_ = classIDcounter_s++;
     }
 
Index: /code/branches/FICN/src/orxonox/core/Identifier.h
===================================================================
--- /code/branches/FICN/src/orxonox/core/Identifier.h	(revision 697)
+++ /code/branches/FICN/src/orxonox/core/Identifier.h	(revision 698)
@@ -137,5 +137,5 @@
                 { this->configValues_[varname] = container; }
 
-            std::map<std::string, Identifier*>& getIdentifierMap();
+            static std::map<std::string, Identifier*>& getIdentifierMap();
 
         private:
@@ -171,5 +171,4 @@
             bool bCreatedOneObject_;                                    //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
             static int hierarchyCreatingCounter_s;                      //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
-            static unsigned int classIDcounter_s;                       //!< The number of existing Identifiers
             unsigned int classID_;                                      //!< The network ID to identify a class through the network
             std::map<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
@@ -197,6 +196,6 @@
         private:
             ClassIdentifier();
-            ClassIdentifier(const ClassIdentifier<T>& identifier) {} // don't copy
-            ~ClassIdentifier();
+            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
+            ~ClassIdentifier() {}                                       // don't delete
 
             ObjectList<T>* objects_;    //!< The ObjectList, containing all objects of type T
@@ -211,15 +210,6 @@
     ClassIdentifier<T>::ClassIdentifier()
     {
-        this->objects_ = new ObjectList<T>;
+        this->objects_ = ObjectList<T>::getList();
         this->bSetName_ = false;
-    }
-
-    /**
-        @brief Destructor: Deletes the ObjectList, sets the singleton-pointer to zero.
-    */
-    template <class T>
-    ClassIdentifier<T>::~ClassIdentifier()
-    {
-        delete this->objects_;
     }
 
Index: /code/branches/FICN/src/orxonox/core/ObjectList.h
===================================================================
--- /code/branches/FICN/src/orxonox/core/ObjectList.h	(revision 697)
+++ /code/branches/FICN/src/orxonox/core/ObjectList.h	(revision 698)
@@ -82,26 +82,24 @@
     {
         public:
+            static ObjectList<T>* getList();
+
+            ObjectListElement<T>* add(T* object);
+//            void remove(OrxonoxClass* object, bool bIterateForwards = true);
+
+            /** @returns the first element in the list */
+            inline static Iterator<T> start()
+                { return Iterator<T>(getList()->first_); }
+
+            /** @returns the last element in the list */
+            inline static Iterator<T> end()
+                { return Iterator<T>(getList()->last_); }
+
+            ObjectListElement<T>* first_;       //!< The first element in the list
+            ObjectListElement<T>* last_;        //!< The last element in the list
+
+        private:
             ObjectList();
             ~ObjectList();
-            ObjectListElement<T>* add(T* object);
-//            void remove(OrxonoxClass* object, bool bIterateForwards = true);
-
-            /** @returns the first element in the list */
-            inline static Iterator<T> start()
-                { return Iterator<T>(pointer_s->first_); }
-
-            /** @returns the last element in the list */
-            inline static Iterator<T> end()
-                { return Iterator<T>(pointer_s->last_); }
-
-            ObjectListElement<T>* first_;       //!< The first element in the list
-            ObjectListElement<T>* last_;        //!< The last element in the list
-
-        private:
-            static ObjectList<T>* pointer_s;    //!< A static pointer to the last created list (different for all T)
     };
-
-    template <class T>
-    ObjectList<T>* ObjectList<T>::pointer_s = 0; // Set the static member variable pointer_s to zero
 
     /**
@@ -113,8 +111,4 @@
         this->first_ = 0;
         this->last_ = 0;
-
-        // ObjectLists are only created by Identifiers and therefore only one ObjectList of each T will exist.
-        // Thats why pointer_s is in fact a pointer to the only ObjectList for a type, which makes it almost a singleton.
-        this->pointer_s = this;
     }
 
@@ -132,4 +126,14 @@
             this->first_ = temp;
         }
+    }
+
+    /**
+        @returns a pointer to the only existing instance for the given class T.
+    */
+    template <class T>
+    ObjectList<T>* ObjectList<T>::getList()
+    {
+        static ObjectList<T> theOnlyObjectListObjectForClassT = ObjectList<T>();
+        return &theOnlyObjectListObjectForClassT;
     }
 
