Index: /code/branches/FICN/src/misc/String2Number.h
===================================================================
--- /code/branches/FICN/src/misc/String2Number.h	(revision 666)
+++ /code/branches/FICN/src/misc/String2Number.h	(revision 667)
@@ -49,3 +49,90 @@
 };
 
+
+/**
+    @brief Converts a number of any type to a string.
+    @param variable The variable, containing the number.
+
+    @example
+    float f = 3.14;
+    std::string output = number2String(f);
+*/
+template <typename T>
+const std::string& number2String(T variable)
+{
+    std::ostringstream oss;
+    if (oss << variable)
+        return *(new std::string(oss.str()));
+
+    return *(new std::string(""));
+}
+
+/**
+    @brief Converts a number of any type to a string and assigns a defaultvalue if the conversion fails.
+    @param variable The variable, containing the number.
+    @param fallbackString The assigned string if the conversion fails.
+
+    @example
+    float f = 3.14;
+    std::string output = number2String(f, "0.000000");
+*/
+template <typename T>
+const std::string& number2String(T variable, const std::string& fallbackString)
+{
+    std::cout << "N2Sa: " << variable << std::endl;
+
+    std::ostringstream oss;
+    if (oss << variable)
+    {
+    std::cout << "N2Sb: " << oss.str() << std::endl;
+        return *(new std::string(oss.str()));
+    }
+
+    return fallbackString;
+}
+
+/**
+    @brief Converts a string to a number of any type.
+    @param variable The variable wherein the value gets written
+    @return True if the conversion was successful
+
+    @example
+    float f;
+    bool success = string2Number(f, "3.14");
+*/
+template <typename T>
+bool string2Number(T& variable, const std::string& valueString)
+{
+    std::istringstream iss(valueString);
+    if (iss >> variable)
+        return true;
+
+    return false;
+}
+
+/**
+    @brief Converts a string to a number of any type.
+    @param variable The variable wherein the value gets written
+    @param fallbackValue The assigned value if the conversion fails
+    @return True if the conversion was successful
+
+    @example
+    float f;
+    bool success = string2Number(f, "3.14", 0.000000);
+*/
+template <typename T>
+bool string2Number(T& variable, const std::string& valueString, T fallbackValue)
+{
+    std::cout << "S2Na: " << valueString << std::endl;
+    std::istringstream iss(valueString);
+    if (iss >> variable)
+    {
+    std::cout << "S2Nb: " << variable << std::endl;
+        return true;
+    }
+
+    variable = fallbackValue;
+    return false;
+}
+
 #endif
Index: /code/branches/FICN/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/FICN/src/orxonox/Orxonox.cc	(revision 666)
+++ /code/branches/FICN/src/orxonox/Orxonox.cc	(revision 667)
@@ -198,4 +198,5 @@
     ogre_->startRender();
     //TODO: run engine
+    Factory::createClassHierarchy();
     createScene();
     setupScene();
@@ -206,5 +207,4 @@
       std::cout << "client here" << std::endl;
     createFrameListener();
-    Factory::createClassHierarchy();
     switch(mode_){
     case PRESENTATION:
Index: /code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc	(revision 666)
+++ /code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc	(revision 667)
@@ -27,8 +27,8 @@
 
 #include <fstream>
-// #include <string>
 #include "ConfigValueContainer.h"
-
-//#define CONFIGFILEPATH "O:\\oh\\bin\\orxonox.ini"
+#include "../../misc/Tokenizer.h"
+#include "../../misc/String2Number.h"
+
 #define CONFIGFILEPATH "orxonox.ini"
 
@@ -39,5 +39,6 @@
 
     /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_.value_int_.
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
         @param classname The name of the class the variable belongs to
         @param varname The name of the variable
@@ -46,28 +47,109 @@
     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue)
     {
-        // Try to convert the default-value from int to string
-        std::ostringstream ostream;
-        if (ostream << defvalue)
-            this->defvalue_ = ostream.str();
-        else
-            this->defvalue_ = "0";
-
-        // Set the default values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString();
-
-        // Try to convert the value-string to int
-        std::istringstream istream(valueString);
-        if (!(istream >> this->value_.value_int_))
-        {
-            // The conversion failed - use the default value and restore the entry in the config-file
-            this->value_.value_int_ = defvalue;
-            (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-        }
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_.value_double_.
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Int;
+
+        this->defvalueString_ = number2String(defvalue, "0");                   // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+        if (!string2Number(this->value_.value_int_, valueString, defvalue))     // Try to convert the string to a value
+            this->setConfigFileEntyToDefault();                                 // The conversion failed
+
+        std::cout << "CVC: int: " << this->value_.value_int_ << std::endl;
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue)
+    {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = uInt;
+
+        this->defvalueString_ = number2String(defvalue, "0");                   // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+        if (!string2Number(this->value_.value_uint_, valueString, defvalue))    // Try to convert the string to a value
+            this->setConfigFileEntyToDefault();                                 // The conversion failed
+
+        std::cout << "CVC: uint: " << this->value_.value_uint_ << std::endl;
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue)
+    {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Char;
+
+        this->defvalueString_ = number2String((int)defvalue, "0");              // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+        // I used value_int_ instead of value_char_ to avoid number <-> char confusion in the config-file
+        if (!string2Number(this->value_.value_int_, valueString, (int)defvalue))// Try to convert the string to a value
+            this->setConfigFileEntyToDefault();                                 // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue)
+    {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = uChar;
+
+        this->defvalueString_ = number2String((unsigned int)defvalue, "0");     // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+        // I used value_uint_ instead of value_uchar_ to avoid number <-> char confusion in the config-file
+        if (!string2Number(this->value_.value_uint_, valueString, (unsigned int)defvalue)) // Try to convert the string to a value
+            this->setConfigFileEntyToDefault();                                 // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue)
+    {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Float;
+
+        this->defvalueString_ = number2String(defvalue, "0.000000");            // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+        if (!string2Number(this->value_.value_float_, valueString, defvalue))   // Try to convert the string to a value
+            this->setConfigFileEntyToDefault();                                 // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
         @param classname The name of the class the variable belongs to
         @param varname The name of the variable
@@ -76,28 +158,19 @@
     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue)
     {
-        // Try to convert the default-value from double to string
-        std::ostringstream ostream;
-        if (ostream << defvalue)
-            this->defvalue_ = ostream.str();
-        else
-            this->defvalue_ = "0.000000";
-
-        // Set the default values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString();
-
-        // Try to convert the value-string to double
-        std::istringstream istream(valueString);
-        if (!(istream >> this->value_.value_double_))
-        {
-            // The conversion failed - use the default value and restore the entry in the config-file
-            this->value_.value_double_ = defvalue;
-            (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-        }
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_.value_bool_.
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Double;
+
+        this->defvalueString_ = number2String(defvalue, "0.000000");            // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+        if (!string2Number(this->value_.value_double_, valueString, defvalue))  // Try to convert the string to a value
+            this->setConfigFileEntyToDefault();                                 // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
         @param classname The name of the class the variable belongs to
         @param varname The name of the variable
@@ -106,47 +179,55 @@
     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue)
     {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Bool;
+
         // Convert the default-value from bool to string
         if (defvalue)
-            this->defvalue_ = "true";
-        else
-            this->defvalue_ = "false";
-
-        // Set the default values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString();
+            this->defvalueString_ = "true";
+        else
+            this->defvalueString_ = "false";
+
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
 
         // Try to parse the value-string - is it a word?
-        if (valueString.find("true") < valueString.size() || valueString.find("yes") < valueString.size())
+        if (valueString.find("true") < valueString.size()
+         || valueString.find("True") < valueString.size()
+         || valueString.find("yes") < valueString.size()
+         || valueString.find("Yes") < valueString.size())
             this->value_.value_bool_ = true;
-        else if (valueString.find("false") < valueString.size() || valueString.find("no") < valueString.size())
+        else if (valueString.find("false") < valueString.size()
+              || valueString.find("False") < valueString.size()
+              || valueString.find("no") < valueString.size()
+              || valueString.find("No") < valueString.size())
             this->value_.value_bool_ = false;
         else
         {
             // Its not a known word - is it a number?
-            std::istringstream istream(valueString);
-            if (!(istream >> this->value_.value_bool_))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_.value_bool_ = defvalue;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-        }
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_string_.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
-    {
-        // Convert the string to a "config-file-string" with quotes
-        this->defvalue_ = "\"" + std::string(defvalue) + "\"";
-
-        // Set the default-values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString(false);
+            std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
+            if (!string2Number(this->value_.value_bool_, valueString, defvalue))    // Try to convert the string to a value
+                this->setConfigFileEntyToDefault();                                 // The conversion failed
+        }
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue)
+    {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = String;
+
+        this->defvalueString_ = "\"" + defvalue + "\"";                         // Convert the string to a "config-file-string" with quotes
+
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+        std::string valueString = this->parseValueString(false);                // Parses the value string from the config-file-entry
 
         // Strip the quotes
@@ -165,11 +246,48 @@
             // It wasn't - use the default-value and restore the entry in the config-file.
             this->value_string_ = defvalue;
-            (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-        }
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_vector2_.
+            this->setConfigFileEntyToDefault();
+        }
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
+    {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = ConstChar;
+
+        this->defvalueString_ = "\"" + std::string(defvalue) + "\"";            // Convert the string to a "config-file-string" with quotes
+
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+        std::string valueString = this->parseValueString(false);                // Parses the value string from the config-file-entry
+
+        // Strip the quotes
+        unsigned int pos1 = valueString.find("\"") + 1;
+        unsigned int pos2 = valueString.find("\"", pos1);
+
+        // Check if the entry was correctly quoted
+        if (pos1 < valueString.length() && pos2 < valueString.length() && !(valueString.find("\"", pos2 + 1) < valueString.length()))
+        {
+            // It was - get the string between the quotes
+            valueString = valueString.substr(pos1, pos2 - pos1);
+            this->value_string_ = valueString;
+        }
+        else
+        {
+            // It wasn't - use the default-value and restore the entry in the config-file.
+            this->value_string_ = defvalue;
+            this->setConfigFileEntyToDefault();
+        }
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
         @param classname The name of the class the variable belongs to
         @param varname The name of the variable
@@ -178,73 +296,42 @@
     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector2 defvalue)
     {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Vector2;
+
         // Try to convert the default-value from Vector2 to string
         std::ostringstream ostream;
         if (ostream << "(" << defvalue.x << "," << defvalue.y << ")")
-            this->defvalue_ = ostream.str();
-        else
-            this->defvalue_ = "(0,0)";
-
-        // Set the default values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString();
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0)";
+
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
 
         // Strip the value-string
-        bool bEntryIsCorrupt = false;
-        valueString = this->getStrippedLine(valueString);
-        unsigned int pos1, pos2, pos3;
-        pos1 = valueString.find("(");
-        if (pos1 == 0)
-            valueString.erase(pos1, 1);
-        else
-            bEntryIsCorrupt = true;
-
-        pos2 = valueString.find(")");
-        if (pos2 == valueString.length() - 1)
-            valueString.erase(pos2, 1);
-        else
-            bEntryIsCorrupt = true;
-
-        int count = 0;
-        while ((pos3 = valueString.find(",")) < valueString.length())
-        {
-            count++;
-            valueString.replace(pos3, 1, " ");
-            if (pos3 < pos1)
-                bEntryIsCorrupt = true;
-        }
-
-        if (count != 1)
-            bEntryIsCorrupt = true;
+        unsigned int pos1 = valueString.find("(") + 1;
+        unsigned int pos2 = valueString.find(")", pos1);
 
         // Try to convert the stripped value-string to Vector2
-        if (!bEntryIsCorrupt)
-        {
-            std::istringstream istream(valueString);
-            if (!(istream >> this->value_vector2_.x))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_vector2_.x = defvalue.x;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-            if (!(istream >> this->value_vector2_.y))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_vector2_.y = defvalue.y;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-        }
-        else
-        {
-            // The conversion failed - use the default value and restore the entry in the config-file
+        if (pos1 < valueString.length() && pos2 < valueString.length() && pos1 < pos2)
+        {
+            valueString = valueString.substr(pos1, pos2 - pos1);
+            std::vector<std::string> tokens = tokenize(valueString, ",");
+            if (!string2Number(this->value_vector2_.x, tokens[0], defvalue.x))
+                this->setConfigFileEntyToDefault();
+            if (!string2Number(this->value_vector2_.y, tokens[1], defvalue.y))
+                this->setConfigFileEntyToDefault();
+        }
+        else
+        {
             this->value_vector2_ = defvalue;
-            (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-        }
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_vector3_.
+            this->setConfigFileEntyToDefault();
+        }
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
         @param classname The name of the class the variable belongs to
         @param varname The name of the variable
@@ -253,80 +340,44 @@
     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector3 defvalue)
     {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = Vector3;
+
         // Try to convert the default-value from Vector3 to string
         std::ostringstream ostream;
         if (ostream << "(" << defvalue.x << "," << defvalue.y << "," << defvalue.z << ")")
-            this->defvalue_ = ostream.str();
-        else
-            this->defvalue_ = "(0,0,0)";
-
-        // Set the default values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString();
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0,0)";
+
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
 
         // Strip the value-string
-        bool bEntryIsCorrupt = false;
-        valueString = this->getStrippedLine(valueString);
-        unsigned int pos1, pos2, pos3;
-        pos1 = valueString.find("(");
-        if (pos1 == 0)
-            valueString.erase(pos1, 1);
-        else
-            bEntryIsCorrupt = true;
-
-        pos2 = valueString.find(")");
-        if (pos2 == valueString.length() - 1)
-            valueString.erase(pos2, 1);
-        else
-            bEntryIsCorrupt = true;
-
-        int count = 0;
-        while ((pos3 = valueString.find(",")) < valueString.length())
-        {
-            count++;
-            valueString.replace(pos3, 1, " ");
-            if (pos3 < pos1)
-                bEntryIsCorrupt = true;
-        }
-
-        if (count != 2)
-            bEntryIsCorrupt = true;
+        unsigned int pos1 = valueString.find("(") + 1;
+        unsigned int pos2 = valueString.find(")", pos1);
 
         // Try to convert the stripped value-string to Vector3
-        if (!bEntryIsCorrupt)
-        {
-            std::istringstream istream(valueString);
-            if (!(istream >> this->value_vector3_.x))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_vector3_.x = defvalue.x;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-            if (!(istream >> this->value_vector3_.y))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_vector3_.y = defvalue.y;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-            if (!(istream >> this->value_vector3_.z))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_vector3_.z = defvalue.z;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-        }
-        else
-        {
-            // The conversion failed - use the default value and restore the entry in the config-file
+        if (pos1 < valueString.length() && pos2 < valueString.length() && pos1 < pos2)
+        {
+            valueString = valueString.substr(pos1, pos2 - pos1);
+            std::vector<std::string> tokens = tokenize(valueString, ",");
+            if (!string2Number(this->value_vector3_.x, tokens[0], defvalue.x))
+                this->setConfigFileEntyToDefault();
+            if (!string2Number(this->value_vector3_.y, tokens[1], defvalue.y))
+                this->setConfigFileEntyToDefault();
+            if (!string2Number(this->value_vector3_.z, tokens[2], defvalue.z))
+                this->setConfigFileEntyToDefault();
+        }
+        else
+        {
             this->value_vector3_ = defvalue;
-            (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-        }
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets this->value_colourvalue_.
+            this->setConfigFileEntyToDefault();
+        }
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
         @param classname The name of the class the variable belongs to
         @param varname The name of the variable
@@ -335,108 +386,52 @@
     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::ColourValue defvalue)
     {
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = ColourValue;
+
         // Try to convert the default-value from ColourValue to string
         std::ostringstream ostream;
         if (ostream << "(" << defvalue.r << "," << defvalue.g << "," << defvalue.b << "," << defvalue.a << ")")
-            this->defvalue_ = ostream.str();
-        else
-            this->defvalue_ = "(0,0,0,0)";
-
-        // Set the default values, then get the value-string
-        this->setDefaultValues(classname, varname);
-        std::string valueString = this->getValueString();
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0,0,0)";
+
+        this->searchConfigFileLine();                                           // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                     // Parses the value string from the config-file-entry
 
         // Strip the value-string
-        bool bEntryIsCorrupt = false;
-        valueString = this->getStrippedLine(valueString);
-        unsigned int pos1, pos2, pos3;
-        pos1 = valueString.find("(");
-        if (pos1 == 0)
-            valueString.erase(pos1, 1);
-        else
-            bEntryIsCorrupt = true;
-
-        pos2 = valueString.find(")");
-        if (pos2 == valueString.length() - 1)
-            valueString.erase(pos2, 1);
-        else
-            bEntryIsCorrupt = true;
-
-        int count = 0;
-        while ((pos3 = valueString.find(",")) < valueString.length())
-        {
-            count++;
-            valueString.replace(pos3, 1, " ");
-            if (pos3 < pos1)
-                bEntryIsCorrupt = true;
-        }
-
-        if (count != 3)
-            bEntryIsCorrupt = true;
+        unsigned int pos1 = valueString.find("(") + 1;
+        unsigned int pos2 = valueString.find(")", pos1);
 
         // Try to convert the stripped value-string to Vector3
-        if (!bEntryIsCorrupt)
-        {
-            std::istringstream istream(valueString);
-            if (!(istream >> this->value_colourvalue_.r))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_colourvalue_.r = defvalue.r;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-            if (!(istream >> this->value_colourvalue_.g))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_colourvalue_.g = defvalue.g;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-            if (!(istream >> this->value_colourvalue_.b))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_colourvalue_.b = defvalue.b;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-            if (!(istream >> this->value_colourvalue_.a))
-            {
-                // The conversion failed - use the default value and restore the entry in the config-file
-                this->value_colourvalue_.a = defvalue.a;
-                (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-                ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-            }
-        }
-        else
-        {
-            // The conversion failed - use the default value and restore the entry in the config-file
+        if (pos1 < valueString.length() && pos2 < valueString.length() && pos1 < pos2)
+        {
+            valueString = valueString.substr(pos1, pos2 - pos1);
+            std::vector<std::string> tokens = tokenize(valueString, ",");
+            if (!string2Number(this->value_colourvalue_.r, tokens[0], defvalue.r))
+                this->setConfigFileEntyToDefault();
+            if (!string2Number(this->value_colourvalue_.g, tokens[1], defvalue.g))
+                this->setConfigFileEntyToDefault();
+            if (!string2Number(this->value_colourvalue_.b, tokens[2], defvalue.b))
+                this->setConfigFileEntyToDefault();
+            if (!string2Number(this->value_colourvalue_.a, tokens[3], defvalue.a))
+                this->setConfigFileEntyToDefault();
+        }
+        else
+        {
             this->value_colourvalue_ = defvalue;
-            (*this->configFileLine_) = this->varname_ + "=" + this->defvalue_;
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
-        }
-    }
-
-    /**
-        @brief Sets the default values of the container and searches the coresponding entry in the config-file.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-    */
-    void ConfigValueContainer::setDefaultValues(const std::string& classname, const std::string& varname)
-    {
-        // Set the class and variable names
-        this->classname_ = classname;
-        this->varname_ = varname;
-
-        // Search the entry in the config-file
-        this->searchConfigFileLine();
-
-        // Set the values of all types to zero
-        this->value_.value_int_ = 0;
-        this->value_.value_double_ = 0.000000;
-        this->value_.value_bool_ = false;
-        this->value_string_ = "";
-        this->value_vector2_ = Ogre::Vector2(0, 0);
-        this->value_vector3_ = Ogre::Vector3(0, 0, 0);
-        this->value_colourvalue_ = Ogre::ColourValue(0, 0, 0, 0);
-    }
+            this->setConfigFileEntyToDefault();
+        }
+    }
+
+    /**
+        @brief Sets the corresponding enty in the config-file back to the default value.
+    */
+    void ConfigValueContainer::setConfigFileEntyToDefault()
+    {
+        (*this->configFileLine_) = this->varname_ + "=" + this->defvalueString_;
+        ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+    }
+
 
     /**
@@ -503,5 +498,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->defvalue_);
+                        this->configFileLine_ = this->configFileLines_s->insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
                         ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
                         success = true;
@@ -523,5 +518,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->defvalue_);
+                    this->configFileLine_ = this->configFileLines_s->insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
                     ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
                     success = true;
@@ -535,10 +530,10 @@
         {
             // 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->defvalue_); // Create the line
-            this->configFileLine_ = --this->configFileLines_s->end();                   // Set the pointer to the last element
+            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
             success = true;
-            this->configFileLines_s->push_back("");                                     // Add an empty line - this is needed for the algorithm in the searchConfigFileLine-function
-            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);                      // Save the changed config-file
+            this->configFileLines_s->push_back("");                                             // Add an empty line - this is needed for the algorithm in the searchConfigFileLine-function
+            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);                              // Save the changed config-file
         }
     }
@@ -597,5 +592,5 @@
         @return The value-string
     */
-    std::string ConfigValueContainer::getValueString(bool bStripped)
+    std::string ConfigValueContainer::parseValueString(bool bStripped)
     {
         std::string output;
Index: /code/branches/FICN/src/orxonox/core/ConfigValueContainer.h
===================================================================
--- /code/branches/FICN/src/orxonox/core/ConfigValueContainer.h	(revision 666)
+++ /code/branches/FICN/src/orxonox/core/ConfigValueContainer.h	(revision 667)
@@ -45,6 +45,11 @@
         public:
             ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue);
             ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue);
             ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue);
             ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue);
             ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector2 defvalue);
@@ -52,7 +57,7 @@
             ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::ColourValue defvalue);
 
-            void setDefaultValues(const std::string& classname, const std::string& varname);
+            void setConfigFileEntyToDefault();
             void searchConfigFileLine();
-            std::string getValueString(bool bStripped = true);
+            std::string parseValueString(bool bStripped = true);
 
             static std::string getStrippedLine(const std::string& line);
@@ -62,17 +67,27 @@
             static void writeConfigFile(const std::string& filename);
 
-            /** @returns the value of the type int. @param value This is only needed to determine the right type. */
+            /** @returns the value. @param value This is only needed to determine the right type. */
             inline int getValue(int value)                                      { return this->value_.value_int_; }
-            /** @returns the value of the type double. @param value This is only needed to determine the right type. */
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline unsigned int getValue(unsigned int value)                    { return this->value_.value_uint_; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline char getValue(char value)                                    { return this->value_.value_char_; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline unsigned char getValue(unsigned char value)                  { return this->value_.value_uchar_; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline float getValue(float value)                                  { return this->value_.value_float_; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
             inline double getValue(double value)                                { return this->value_.value_double_; }
-            /** @returns the value of the type bool. @param value This is only needed to determine the right type. */
+            /** @returns the value. @param value This is only needed to determine the right type. */
             inline bool getValue(bool value)                                    { return this->value_.value_bool_; }
-            /** @returns the value of the type std::string. @param value This is only needed to determine the right type. */
-            inline std::string getValue(const std::string& value)               { return this->value_string_; }
-            /** @returns the value of the type Vector2. @param value This is only needed to determine the right type. */
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline const std::string& getValue(const std::string& value)        { return this->value_string_; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline const char* getValue(const char* value)                      { return this->value_string_.c_str(); }
+            /** @returns the value. @param value This is only needed to determine the right type. */
             inline Ogre::Vector2 getValue(const Ogre::Vector2& value)           { return this->value_vector2_; }
-            /** @returns the value of the type Vector3. @param value This is only needed to determine the right type. */
+            /** @returns the value. @param value This is only needed to determine the right type. */
             inline Ogre::Vector3 getValue(const Ogre::Vector3& value)           { return this->value_vector3_; }
-            /** @returns the value of the type Colour�Value. @param value This is only needed to determine the right type. */
+            /** @returns the value. @param value This is only needed to determine the right type. */
             inline Ogre::ColourValue getValue(const Ogre::ColourValue& value)   { return this->value_colourvalue_; }
 
@@ -80,12 +95,16 @@
             std::string         classname_;                     //!< The name of the class the variable belongs to
             std::string         varname_;                       //!< The name of the variable
-            std::string         defvalue_;                      //!< The string of the default-variable
+            std::string         defvalueString_;                //!< The string of the default-variable
 
             union MultiType
             {
                 int                 value_int_;                 //!< The value, if the variable is of the type int
+                unsigned int        value_uint_;                //!< The value, if the variable is of the type unsigned int
+                char                value_char_;                //!< The value, if the variable is of the type char
+                unsigned char       value_uchar_;               //!< The value, if the variable is of the type unsigned char
+                float               value_float_;               //!< The value, if the variable is of the type float
                 double              value_double_;              //!< The value, if the variable is of the type double
                 bool                value_bool_;                //!< The value, if the variable is of the type bool
-            } value_;
+            } value_;                                           //!< The value of the variable
 
             std::string         value_string_;                  //!< The value, if the variable is of the type string
@@ -97,4 +116,20 @@
             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
+            {
+                Int,
+                uInt,
+                Char,
+                uChar,
+                Float,
+                Double,
+                Bool,
+                ConstChar,
+                String,
+                Vector2,
+                Vector3,
+                ColourValue
+            } type_;                                            //!< The type of the variable
     };
 }
Index: /code/branches/FICN/src/orxonox/core/CoreIncludes.h
===================================================================
--- /code/branches/FICN/src/orxonox/core/CoreIncludes.h	(revision 666)
+++ /code/branches/FICN/src/orxonox/core/CoreIncludes.h	(revision 667)
@@ -106,5 +106,5 @@
     if (!container##varname) \
     { \
-        container##varname = new orxonox::ConfigValueContainer(this->getIdentifier()->getName(), #varname, defvalue); \
+        container##varname = new orxonox::ConfigValueContainer(this->getIdentifier()->getName(), #varname, varname = defvalue); \
         this->getIdentifier()->setConfigValueContainer(#varname, container##varname); \
     } \
Index: /code/branches/FICN/src/orxonox/core/Factory.cc
===================================================================
--- /code/branches/FICN/src/orxonox/core/Factory.cc	(revision 666)
+++ /code/branches/FICN/src/orxonox/core/Factory.cc	(revision 667)
@@ -84,5 +84,5 @@
     void Factory::createClassHierarchy()
     {
-        COUT(4) << "*** Factory -> Create class-hierarchy\n";
+        COUT(3) << "*** Factory -> Create class-hierarchy\n";
         std::map<std::string, Identifier*>::iterator it;
         it = getFactoryPointer()->identifierStringMap_.begin();
@@ -95,5 +95,5 @@
         }
         (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy();
-        COUT(4) << "*** Factory -> Finished class-hierarchy creation\n";
+        COUT(3) << "*** Factory -> Finished class-hierarchy creation\n";
     }
 
Index: /code/branches/FICN/src/orxonox/objects/test3.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/test3.cc	(revision 666)
+++ /code/branches/FICN/src/orxonox/objects/test3.cc	(revision 667)
@@ -16,8 +16,13 @@
     void Test3::setConfigValues()
     {
-        SetConfigValue(value_int_, -100);
-        SetConfigValue(value_double_, 10.555678);
-        SetConfigValue(value_bool_, true);
-        SetConfigValue(value_string_, "Dies ist ein Test");
+        SetConfigValue(value_int_, 1);
+        SetConfigValue(value_uint_, 1);
+        SetConfigValue(value_char_, 1);
+        SetConfigValue(value_uchar_, 1);
+        SetConfigValue(value_float_, 1);
+        SetConfigValue(value_double_, 1);
+        SetConfigValue(value_bool_, 1);
+        SetConfigValue(value_string_, "This is a test");
+        SetConfigValue(value_constchar_, "This is another test");
         SetConfigValue(value_vector2_, Vector2(101, 202));
         SetConfigValue(value_vector3_, Vector3(13, 26, 39));
@@ -29,11 +34,15 @@
     }
 
-        #include <fstream>
     void Test3::configOutput()
     {
         std::cout << this->value_int_ << std::endl;
+        std::cout << this->value_uint_ << std::endl;
+        std::cout << (int)this->value_char_ << std::endl;
+        std::cout << (int)this->value_uchar_ << std::endl;
+        std::cout << this->value_float_ << std::endl;
         std::cout << this->value_double_ << std::endl;
         std::cout << this->value_bool_ << std::endl;
         std::cout << this->value_string_ << std::endl;
+        std::cout << this->value_constchar_ << std::endl;
         std::cout << this->value_vector2_ << std::endl;
         std::cout << this->value_vector3_ << std::endl;
@@ -41,6 +50,6 @@
     }
 
-        #define testandcout(code) \
-          std::cout << #code << " " << code << "\n"
+    #define testandcout(code) \
+      std::cout << #code << " " << code << "\n"
 
     void Test3::usefullClassesIsATest(Test1* test1)
Index: /code/branches/FICN/src/orxonox/objects/test3.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/test3.h	(revision 666)
+++ /code/branches/FICN/src/orxonox/objects/test3.h	(revision 667)
@@ -24,7 +24,12 @@
         private:
             int                 value_int_;
+            unsigned int        value_uint_;
+            char                value_char_;
+            unsigned char       value_uchar_;
+            float               value_float_;
             double              value_double_;
             bool                value_bool_;
             std::string         value_string_;
+            const char*         value_constchar_;
             Vector2             value_vector2_;
             Vector3             value_vector3_;
