Index: code/branches/objecthierarchy/src/orxonox/core/ClassFactory.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/ClassFactory.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/ClassFactory.h	(revision 365)
@@ -1,2 +1,9 @@
+/*!
+    @file ClassFactory.h
+    @brief Definition of the ClassFactory class
+
+    The ClassFactory is able to create new objects of a specific class.
+*/
+
 #ifndef _ClassFactory_H__
 #define _ClassFactory_H__
@@ -9,4 +16,5 @@
     // ###      ClassFactory       ###
     // ###############################
+    //! The ClassFactory is able to create new objects of a specific class.
     template <class T>
     class ClassFactory : public BaseFactory
@@ -17,16 +25,22 @@
 
         private:
-            ClassFactory() {}
-            ClassFactory(const ClassFactory& factory) {}
-            ~ClassFactory() {}
+            ClassFactory() {}                               // Don't create
+            ClassFactory(const ClassFactory& factory) {}    // Don't copy
+            ~ClassFactory() {}                              // Don't delete
 
             static T* createNewObject();
     };
 
+    /**
+        @brief Adds the ClassFactory to the Identifier of the same type and creates a new object to retrieve the parents.
+        @return True, because the compiler only allows assignments before main()
+    */
     template <class T>
     bool ClassFactory<T>::create()
     {
+        // Add the ClassFactory to the Classidentifier of type T
         ClassIdentifier<T>::getIdentifier()->addFactory(new ClassFactory<T>);
 
+        // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
         ClassIdentifier<T>::getIdentifier()->startCreatingHierarchy();
 #if HIERARCHY_VERBOSE
@@ -40,4 +54,8 @@
     }
 
+    /**
+        @brief Creates and returns a new object of class T.
+        @return The new object
+    */
     template <class T>
     BaseObject* ClassFactory<T>::fabricate()
@@ -46,4 +64,8 @@
     }
 
+    /**
+        @brief Creates and returns a new object of class T; this is a wrapper for the new operator.
+        @return The new object
+    */
     template <class T>
     T* ClassFactory<T>::createNewObject()
Index: code/branches/objecthierarchy/src/orxonox/core/Factory.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Factory.cc	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/Factory.cc	(revision 365)
@@ -1,2 +1,7 @@
+/*!
+    @file Factory.cc
+    @brief Implementation of the Factory class.
+*/
+
 #include "Factory.h"
 #include "Identifier.h"
@@ -4,6 +9,10 @@
 namespace orxonox
 {
-    Factory* Factory::pointer_s = NULL;
+    Factory* Factory::pointer_s = NULL; // Set the static member variable pointer_s to zero
 
+    /**
+        @returns the Identifier with a given name.
+        @param name The name of the wanted Identifier
+    */
     Identifier* Factory::getIdentifier(const std::string& name)
     {
@@ -14,4 +23,8 @@
     }
 
+    /**
+        @returns the Identifier with a given networkID.
+        @param id The networkID of the wanted Identifier
+    */
     Identifier* Factory::getIdentifier(const unsigned int id)
     {
@@ -22,4 +35,9 @@
     }
 
+    /**
+        @brief Adds a new Identifier to both maps.
+        @param name The name of the identifier
+        @param identifier The identifier to add
+    */
     void Factory::add(const std::string& name, Identifier* identifier)
     {
@@ -31,4 +49,10 @@
     }
 
+    /**
+        @brief Removes the entry with the old networkID and adds a new one.
+        @param identifier The identifier to change
+        @param oldID The old networkID
+        @param newID The new networkID
+    */
     void Factory::changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID)
     {
Index: code/branches/objecthierarchy/src/orxonox/core/Factory.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Factory.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/Factory.h	(revision 365)
@@ -1,2 +1,17 @@
+/*!
+    @file Factory.h
+    @brief Definition of the Factory and the BaseFactory class.
+
+    The Factory is a singleton, containing two maps to map either the name or the networkID
+    of a class with the corresponding Identifier.
+
+    Usage:
+    ID(classname) or ID(networkID) returns the corresponding Identifier.
+
+
+    BaseObject is the parent of ClassFactory which is defined in ClassFactory.h.
+    It can't be defined in ClassFactory.h, because of circular dependencies.
+*/
+
 #ifndef _Factory_H__
 #define _Factory_H__
@@ -7,10 +22,11 @@
 namespace orxonox
 {
-    class BaseObject;
-    class Identifier;
+    class BaseObject; // Forward declaration
+    class Identifier; // Forward declaration
 
     // ###############################
     // ###         Factory         ###
     // ###############################
+    //! The Factory is used to map name or networkID of a class with its Identifier.
     class Factory
     {
@@ -22,11 +38,11 @@
 
         private:
-            Factory() {}
-            Factory(const Factory& factory) {}
-            ~Factory() {}
+            Factory() {}                        // don't create
+            Factory(const Factory& factory) {}  // don't copy
+            ~Factory() {}                       // don't delete
 
-            static Factory* pointer_s;
-            std::map<std::string, Identifier*> identifierStringMap_;
-            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;
+            static Factory* pointer_s;                                          //!< The pointer to the singleton
+            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map mapping string with Identifier
+            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map mapping networkID with Identifier
     };
 
@@ -34,4 +50,5 @@
     // ###       BaseFactory       ###
     // ###############################
+    //! Base-class of ClassFactory. Has to be defined separate because of circular dependencies.
     class BaseFactory
     {
Index: code/branches/objecthierarchy/src/orxonox/core/Identifier.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Identifier.cc	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/Identifier.cc	(revision 365)
@@ -1,2 +1,7 @@
+/*!
+    @file Identifier.cc
+    @brief Implementation of the Identifier class.
+*/
+
 #include "Identifier.h"
 
@@ -6,7 +11,10 @@
     // ###       Identifier        ###
     // ###############################
-    int Identifier::hierarchyCreatingCounter_s = 0;
-    unsigned int Identifier::classIDcounter_s = 0;
+    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
 
+    /**
+        @brief Constructor: No factory, no object created, new ObjectList and a unique networkID.
+    */
     Identifier::Identifier()
     {
@@ -18,11 +26,17 @@
     }
 
+    /**
+        @brief Destructor: Deletes the name and the IdentifierList containing the children.
+    */
     Identifier::~Identifier()
     {
         delete &this->name_;
-
         delete this->children_;
     }
 
+    /**
+        @brief Initializes the Identifier with an IdentifierList containing all parents of the class the Identifier belongs to.
+        @param parents The IdentifierList containing all parents
+    */
     void Identifier::initialize(const IdentifierList* parents)
     {
@@ -38,5 +52,5 @@
             {
                 this->parents_.add(temp1->identifier_);
-                temp1->identifier_->getChildren().add(this);
+                temp1->identifier_->getChildren().add(this); // We're a child of our parents
 
                 temp1 = temp1->next_;
@@ -45,12 +59,17 @@
     }
 
+    /**
+        @brief Creates an object of the type the Identifier belongs to.
+        @return The new object
+    */
     BaseObject* Identifier::fabricate()
     {
         if (this->factory_)
         {
-            return this->factory_->fabricate();
+            return this->factory_->fabricate(); // We have to return a BaseObject, because we don't know the exact type.
         }
         else
         {
+            // Abstract classes don't have a factory and therefore can't create new objects
             std::cout << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract.\n";
             std::cout << "Aborting...";
@@ -59,4 +78,8 @@
     }
 
+    /**
+        @brief Sets the networkID to a new value and changes the entry in the Factory.
+        @param id The new networkID
+    */
     void Identifier::setNetworkID(unsigned int id)
     {
@@ -65,4 +88,8 @@
     }
 
+    /**
+        @returns true, if the Identifier is at least of the given type.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isA(const Identifier* identifier) const
     {
@@ -70,4 +97,8 @@
     }
 
+    /**
+        @returns true, if the Identifier is exactly of the given type.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isDirectlyA(const Identifier* identifier) const
     {
@@ -75,4 +106,8 @@
     }
 
+    /**
+        @returns true, if the assigned identifier is a child of the given identifier.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isChildOf(const Identifier* identifier) const
     {
@@ -80,4 +115,8 @@
     }
 
+    /**
+        @returns true, if the assigned identifier is a parent of the given identifier.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isParentOf(const Identifier* identifier) const
     {
Index: code/branches/objecthierarchy/src/orxonox/core/Identifier.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Identifier.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/Identifier.h	(revision 365)
@@ -1,2 +1,24 @@
+/*!
+    @file Identifier.h
+    @brief Definition of the Identifier, ClassIdentifier and SubclassIdentifier classes.
+
+    The Identifier contains all needed informations about the class it belongs to:
+     - the name
+     - a list with all objects
+     - parents and childs
+     - the factory, if available
+     - the networkID that can be synchronised with the server
+
+    Every object has a pointer to the Identifier of its class. This allows the use isA(...),
+    isDirectlyA(...), isChildOf(...) and isParentOf(...).
+
+    To create the class-hierarchy, the Identifier has some intern functions and variables.
+
+    Every Identifier is in fact a ClassIdentifier, but they are derived from Identifier.
+
+    SubclassIdentifier is a separated class, acting like an Identifier, but has a given class.
+    You can only assign Identifiers of the given class or a derivative to a SubclassIdentifier.
+*/
+
 #ifndef _Identifier_H__
 #define _Identifier_H__
@@ -13,22 +35,38 @@
 namespace orxonox
 {
-    class BaseObject;
+    class BaseObject; // Forward declaration
 
     // ###############################
     // ###       Identifier        ###
     // ###############################
+    //! The Identifier is used to identify the class of an object and to store informations about the class.
+    /**
+        The Identifier contains all needed informations about the class it belongs to:
+         - the name
+         - a list with all objects
+         - parents and childs
+         - the factory, if available
+         - the networkID that can be synchronised with the server
+
+        Every object has a pointer to the Identifier of its class. This allows the use isA(...),
+        isDirectlyA(...), isChildOf(...) and isParentOf(...).
+
+        You can't directly create an Identifier, it's just the base-class for ClassIdentifier.
+    */
     class Identifier
     {
         template <class T>
-        friend class ClassIdentifier;
+        friend class ClassIdentifier; // Forward declaration
 
         template <class T>
-        friend class SubclassIdentifier;
+        friend class SubclassIdentifier; // Forward declaration
 
         template <class T>
-        friend class ClassFactory;
+        friend class ClassFactory; // Forward declaration
 
         public:
+            /** @brief Sets the Factory. @param facotry The factory to assign */
             inline void addFactory(BaseFactory* factory) { this->factory_ = factory; }
+
             BaseObject* fabricate();
 
@@ -38,19 +76,30 @@
             bool isParentOf(const Identifier* identifier) const;
 
+            /** @returns the name of the class the Identifier belongs to. */
             inline const std::string& getName() const { return this->name_; }
+
+            /** @returns the parents of the class the Identifier belongs to. */
             inline const IdentifierList& getParents() const { return this->parents_; }
+
+            /** @returns the children of the class the Identifier belongs to. */
             inline IdentifierList& getChildren() const { return *this->children_; }
 
+            /** @returns true, if a branch of the class-hierarchy is getting created, causing all new objects to store their parents. */
             inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
 
+            /** @returns the NetworkID to identify a class through the network. */
             inline const unsigned int getNetworkID() const { return this->classID_; }
+
             void setNetworkID(unsigned int id);
 
         private:
             Identifier();
-            Identifier(const Identifier& identifier) {}
+            Identifier(const Identifier& identifier) {} // don't copy
             virtual ~Identifier();
             void initialize(const IdentifierList* parents);
 
+            /**
+                @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
+            */
             inline static void startCreatingHierarchy()
             {
@@ -61,4 +110,7 @@
             }
 
+            /**
+                @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
+            */
             inline static void stopCreatingHierarchy()
             {
@@ -69,14 +121,14 @@
             }
 
-            IdentifierList parents_;
-            IdentifierList* children_;
-
-            std::string name_;
-
-            BaseFactory* factory_;
-            bool bCreatedOneObject_;
-            static int hierarchyCreatingCounter_s;
-            static unsigned int classIDcounter_s;
-            unsigned int classID_;
+            IdentifierList parents_;                    //!< The Parents of the class the Identifier belongs to
+            IdentifierList* children_;                  //!< The Children of the class the Identifier belongs to
+
+            std::string name_;                          //!< The name of the class the Identifier belongs to
+
+            BaseFactory* factory_;                      //!< The Factory, able to create new objects of the given class
+            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 unique Identifiers
+            unsigned int classID_;                      //!< The networkID to identify a class through the network
     };
 
@@ -85,4 +137,10 @@
     // ###     ClassIdentifier     ###
     // ###############################
+    //! The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables the Identifier cannot have.
+    /**
+        ClassIdentifier is a Singleton, which means that only one object of a given type T exists.
+        This makes it possible to store informations about a class, sharing them with all
+        objects of that class without defining static variables in every class.
+    */
     template <class T>
     class ClassIdentifier : public Identifier
@@ -95,14 +153,17 @@
         private:
             ClassIdentifier();
-            ClassIdentifier(const ClassIdentifier<T>& identifier) {}
+            ClassIdentifier(const ClassIdentifier<T>& identifier) {} // don't copy
             ~ClassIdentifier();
 
-            static ClassIdentifier<T>* pointer_s;
-            ObjectList<T>* objects_;
+            static ClassIdentifier<T>* pointer_s;       //!< A pointer to the singleton-object
+            ObjectList<T>* objects_;                    //!< The ObjectList, containing all objects of type T
     };
 
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::pointer_s = NULL;
-
+    ClassIdentifier<T>* ClassIdentifier<T>::pointer_s = NULL; // Set the static member variable pointer_s to zero
+
+    /**
+        @brief Constructor: Create the ObjectList.
+    */
     template <class T>
     ClassIdentifier<T>::ClassIdentifier()
@@ -111,4 +172,7 @@
     }
 
+    /**
+        @brief Destructor: Delete the ObjectList, set the singleton-pointer to zero.
+    */
     template <class T>
     ClassIdentifier<T>::~ClassIdentifier()
@@ -118,4 +182,11 @@
     }
 
+    /**
+        @brief Registers a class, which means that the name and the parents get stored.
+        @param parents An IdentifierList, containing the Identifiers of all parents of the class
+        @param name A string, containing exactly the name of the class
+        @param bRootClass True if the class is either an Interface or BaseObject itself
+        @return The ClassIdentifier itself
+    */
     template <class T>
     ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
@@ -124,4 +195,6 @@
         std::cout << "*** Register Class in " << name << "-Singleton.\n";
 #endif
+
+        // It's a singleton, so maybe we have to create it first
         if (!pointer_s)
         {
@@ -132,14 +205,17 @@
         }
 
+        // Check if at least one object of the given type was created
         if (!pointer_s->bCreatedOneObject_)
         {
+            // If no: We have to store the informations and initialize the Identifier
+
 #if HIERARCHY_VERBOSE
             std::cout << "*** Register Class in " << name << "-Singleton -> Initialize Singleton.\n";
 #endif
             pointer_s->name_ = name;
-            Factory::add(name, pointer_s);
+            Factory::add(name, pointer_s); // Add the Identifier to the Factory
 
             if (bRootClass)
-                pointer_s->initialize(NULL);
+                pointer_s->initialize(NULL); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case.
             else
                 pointer_s->initialize(parents);
@@ -149,4 +225,7 @@
     }
 
+    /**
+        @returns the Identifier itself
+    */
     template <class T>
     ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
@@ -163,4 +242,8 @@
     }
 
+    /**
+        @brief Adds an object of the given type to the ObjectList.
+        @param object The object to add
+    */
     template <class T>
     void ClassIdentifier<T>::addObject(T* object)
@@ -169,5 +252,5 @@
         std::cout << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list.\n";
 #endif
-        object->getMetaList()->add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object));
+        object->getMetaList().add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object));
     }
 
@@ -176,16 +259,33 @@
     // ###   SubclassIdentifier    ###
     // ###############################
-    template <class B>
+    //! The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
+    /**
+        You can only assign Identifiers that belong to a class of at least B (or derived) to a SubclassIdentifier<T>.
+        If you assign something else, the program aborts.
+        Because we know the minimal type, a dynamic_cast is done, which makes it easier to create a new object.
+    */
+    template <class T>
     class SubclassIdentifier
     {
         public:
-            SubclassIdentifier();
-
-            SubclassIdentifier<B>& operator=(Identifier* identifier)
-            {
-                if (!identifier->isA(ClassIdentifier<B>::getIdentifier()))
+            /**
+                @brief Constructor: Automaticaly assigns the Identifier of the given class.
+            */
+            SubclassIdentifier()
+            {
+                this->identifier_ = ClassIdentifier<T>::getIdentifier();
+            }
+
+            /**
+                @brief Overloading of the = operator: assigns the identifier and checks its type.
+                @param identifier The Identifier to assign
+                @return The SubclassIdentifier itself
+            */
+            SubclassIdentifier<T>& operator=(Identifier* identifier)
+            {
+                if (!identifier->isA(ClassIdentifier<T>::getIdentifier()))
                 {
-                    std::cout << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<B>::getIdentifier()->getName() << "!\n";
-                    std::cout << "Error: SubclassIdentifier<" << ClassIdentifier<B>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden.\n";
+                    std::cout << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!\n";
+                    std::cout << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden.\n";
                     std::cout << "Aborting...\n";
                     abort();
@@ -195,4 +295,8 @@
             }
 
+            /**
+                @brief Overloading of the * operator: returns the assigned identifier.
+                @return The assigned identifier
+            */
             Identifier* operator*()
             {
@@ -200,4 +304,8 @@
             }
 
+            /**
+                @brief Overloading of the -> operator: returns the assigned identifier.
+                @return The assigned identifier
+            */
             Identifier* operator->() const
             {
@@ -205,16 +313,24 @@
             }
 
-            B* fabricate()
+            /**
+                @brief Creates a new object of the type of the assigned identifier and dynamic_casts it to the minimal type given by the SubclassIdentifier.
+                @return The new object
+            */
+            T* fabricate()
             {
                 BaseObject* newObject = this->identifier_->fabricate();
+
+                // Check if the creation worked
                 if (newObject)
                 {
-                    return dynamic_cast<B*>(newObject);
+                    // Do a dynamic_cast, because an object of type T is much better than of type BaseObject
+                    return dynamic_cast<T*>(newObject);
                 }
                 else
                 {
+                    // Something went terribly wrong
                     if (this->identifier_)
                     {
-                        std::cout << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<B>::getIdentifier()->getName() << "!\n";
+                        std::cout << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!\n";
                         std::cout << "Error: Couldn't fabricate a new Object.\n";
                         std::cout << "Aborting...\n";
@@ -230,24 +346,27 @@
             }
 
+            /** @returns the assigned identifier. */
             inline const Identifier* getIdentifier() const
                 { return this->identifier_; }
+
+            /** @returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
             inline bool isA(const Identifier* identifier) const
                 { return this->identifier_->isA(identifier); }
+
+            /** @returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
             inline bool isDirectlyA(const Identifier* identifier) const
                 { return this->identifier_->isDirectlyA(identifier); }
+
+            /** @returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
             inline bool isChildOf(const Identifier* identifier) const
                 { return this->identifier_->isChildOf(identifier); }
+
+            /** @returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
             inline bool isParentOf(const Identifier* identifier) const
                 { return this->identifier_->isParentOf(identifier); }
 
         private:
-            Identifier* identifier_;
+            Identifier* identifier_;        //!< The assigned identifier
     };
-
-    template <class B>
-    SubclassIdentifier<B>::SubclassIdentifier()
-    {
-        this->identifier_ = ClassIdentifier<B>::getIdentifier();
-    }
 }
 
Index: code/branches/objecthierarchy/src/orxonox/core/IdentifierIncludes.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/IdentifierIncludes.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/IdentifierIncludes.h	(revision 365)
@@ -1,2 +1,14 @@
+/**
+    @file IDentifierIncludes.h
+    @brief Definition of macros for the class-hierarchy and the factory.
+
+    Every class needs the RegisterObject(class) macro in its constructor. If the class is an interface
+    or the BaseObject itself, it needs the macro RegisterRootObject(class) instead.
+
+    To allow the object being created through the factory, use the CreateFactory(class) macro outside
+    the of the class implementation, so it gets executed before main().
+*/
+
+// All needed header-files
 #include "Identifier.h"
 #include "Factory.h"
@@ -6,4 +18,5 @@
 
 
+// Intern macro, containing the common parts of RegisterObject and RegisterRootObject
 #define InternRegisterObject(ClassName, bRootClass) \
     this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \
@@ -12,4 +25,5 @@
     ClassIdentifier<ClassName>::addObject(this)
 
+// Intern macro, containing the specific part of RegisterRootObject
 #define InternRegisterRootObject(ClassName) \
     if (Identifier::isCreatingHierarchy() && !this->getParents()) \
@@ -17,4 +31,5 @@
     InternRegisterObject(ClassName, true)
 
+// RegisterObject - with and without debug output
 #if HIERARCHY_VERBOSE
 #define RegisterObject(ClassName) \
@@ -26,4 +41,5 @@
 #endif
 
+// RegisterRootObject - with and without debug output
 #if HIERARCHY_VERBOSE
 #define RegisterRootObject(ClassName) \
@@ -35,10 +51,13 @@
 #endif
 
+// Class(ClassName) returns the Identifier of the given class
 #define Class(ClassName) \
     ClassIdentifier<ClassName>::getIdentifier()
 
+// Creates the entry in the Factory
 #define CreateFactory(ClassName) \
     bool bCreated##ClassName##Factory = ClassFactory<ClassName>::create()
 
-#define ID(NameOrID) \
-    Factory::getIdentifier(NameOrID)
+// ID(StringOrInt) returns the Identifier with either a given name or a given NetworkID through the factory
+#define ID(StringOrInt) \
+    Factory::getIdentifier(StringOrInt)
Index: code/branches/objecthierarchy/src/orxonox/core/IdentifierList.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/IdentifierList.cc	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/IdentifierList.cc	(revision 365)
@@ -1,2 +1,7 @@
+/*!
+    @file IdentifierList.cc
+    @brief Implementation of the IdentifierList class.
+*/
+
 #include "IdentifierList.h"
 #include "Identifier.h"
@@ -7,4 +12,7 @@
     // ###     IdentifierList      ###
     // ###############################
+    /**
+        @brief Constructor: Sets first_ to zero.
+    */
     IdentifierList::IdentifierList()
     {
@@ -12,4 +20,7 @@
     }
 
+    /**
+        @brief Destructor: Deletes all elements in the list, but NOT THE IDENTIFIERS.
+    */
     IdentifierList::~IdentifierList()
     {
@@ -23,4 +34,8 @@
     }
 
+    /**
+        @brief Adds an Identifier to the list.
+        @param identifier The Identifier to add
+    */
     void IdentifierList::add(const Identifier* identifier)
     {
@@ -30,4 +45,8 @@
     }
 
+    /**
+        @brief Removes an Identifier from the list.
+        @param identifier The Identifier to remove
+    */
     void IdentifierList::remove(const Identifier* identifier)
     {
@@ -35,4 +54,5 @@
             return;
 
+        // Check if we have to delete the first element
         if (this->first_->identifier_ == identifier)
         {
@@ -44,4 +64,5 @@
         }
 
+        // Iterate through the list
         IdentifierListElement* temp = this->first_;
         while (temp->next_)
@@ -60,4 +81,9 @@
     }
 
+    /**
+        @brief Checks if a given Identifier is in the list and returns true if yes.
+        @param identifier The Identifier to check
+        @return True if the Identifier is in the list
+    */
     bool IdentifierList::isInList(const Identifier* identifier) const
     {
@@ -74,4 +100,7 @@
     }
 
+    /**
+        @returns a string, containing the names of all Identifiers in the list.
+    */
     std::string IdentifierList::toString() const
     {
@@ -94,4 +123,8 @@
     // ###  IdentifierListElement  ###
     // ###############################
+    /**
+        @brief Constructor: Creates the list-element with a given identifier.
+        @param identifier The Identifier to store
+    */
     IdentifierListElement::IdentifierListElement(const Identifier* identifier)
     {
@@ -99,7 +132,3 @@
         this->next_ = 0;
     }
-
-    IdentifierListElement::~IdentifierListElement()
-    {
-    }
 }
Index: code/branches/objecthierarchy/src/orxonox/core/IdentifierList.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/IdentifierList.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/IdentifierList.h	(revision 365)
@@ -1,3 +1,11 @@
 #ifndef _IdentifierList_H__
+/*!
+    @file IdentifierList.h
+    @brief Definition of the IdentifierList class
+
+    The IdentifierList is a single-linked list, containing Identifiers.
+    The IdentifierList is used to store parents and childs of each Identifier.
+*/
+
 #define _IdentifierList_H__
 
@@ -6,16 +14,17 @@
 namespace orxonox
 {
-    class Identifier;
+    class Identifier; // Forward declaration
 
+    //! The list-element of the IdentifierList
     class IdentifierListElement
     {
         public:
             IdentifierListElement(const Identifier* identifier);
-            ~IdentifierListElement();
 
-            const Identifier* identifier_;
-            IdentifierListElement* next_;
+            const Identifier* identifier_;      //!< The identifier
+            IdentifierListElement* next_;       //!< The next element in the list
     };
 
+    //! The IdentifierList contains Identifiers
     class IdentifierList
     {
@@ -28,5 +37,5 @@
             std::string toString() const;
 
-            IdentifierListElement* first_;
+            IdentifierListElement* first_;      //!< The first element in the list
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/core/Iterator.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Iterator.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/Iterator.h	(revision 365)
@@ -1,2 +1,19 @@
+/*!
+    @file Iterator.h
+    @brief Definition of the Iterator class.
+
+    The Iterator of a given class allows to iterate through an ObjectList, containing all objects of that type.
+    This is the only way to access the objects in an ObjectList.
+
+    Usage:
+    for (Iterator<class> it = ObjectList<class>::start(); it != 0; ++it)
+    {
+        it->someFunction(...);
+        class* myObject = *it;
+    }
+
+    Warning: Don't delete an object directly through the iterator.
+*/
+
 #ifndef _Iterator_H__
 #define _Iterator_H__
@@ -4,8 +21,12 @@
 namespace orxonox
 {
+    //! The iterator allows to iterate through an ObjectList of a given class.
     template <class T>
     class Iterator
     {
         public:
+            /**
+                @brief Constructor: Sets the element whereon the iterator points to zero.
+            */
             Iterator()
             {
@@ -13,4 +34,8 @@
             }
 
+            /**
+                @brief Constructor: Sets the element whereon the iterator points to a given element.
+                @param element The element to start with
+            */
             Iterator(ObjectListElement<T>* element)
             {
@@ -18,4 +43,8 @@
             }
 
+            /**
+                @brief Overloading of the ++it operator: Iterator iterates to the next object in the list.
+                @return The Iterator itself
+            */
             Iterator<T> operator++()
             {
@@ -24,4 +53,8 @@
             }
 
+            /**
+                @brief Overloading of the --it operator: Iterator iterates to the previous object in the list.
+                @return The Iterator itself
+            */
             Iterator<T> operator--()
             {
@@ -30,4 +63,8 @@
             }
 
+            /**
+                @brief Overloading of the *it operator: returns the pointer to the object.
+                @return The object the Iterator points at
+            */
             T* operator*()
             {
@@ -35,4 +72,8 @@
             }
 
+            /**
+                @brief Overloading of the it-> operator: returns the pointer to the object.
+                @return The object the Iterator points at
+            */
             T* operator->() const
             {
@@ -41,4 +82,8 @@
             }
 
+            /**
+                @brief Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object.
+                @return True if the iterator points to an existing object.
+            */
             operator bool()
             {
@@ -46,6 +91,12 @@
             }
 
+            /**
+                @brief Overloading of the (it != int) operator: Used for (it != 0) instead of typecast-operator to bool.
+                @param compare The integer (must be zero, everything else makes no sense).
+                @return True if the iterator points to an existing object.
+            */
             bool operator!=(int compare)
             {
+                // Comparing with something except zero makes no sense
                 if (compare != 0)
                     std::cout << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works.\n";
@@ -55,5 +106,5 @@
 
         private:
-            ObjectListElement<T>* element_;
+            ObjectListElement<T>* element_;     //!< The element the Iterator points to
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/core/MetaObjectList.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/MetaObjectList.cc	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/MetaObjectList.cc	(revision 365)
@@ -1,6 +1,14 @@
+/*!
+    @file MetaObjectList.cc
+    @brief Implementation of the MetaObjectList class.
+*/
+
 #include "MetaObjectList.h"
 
 namespace orxonox
 {
+    /**
+        @brief Constructor: Sets first_ to zero.
+    */
     MetaObjectList::MetaObjectList()
     {
@@ -8,4 +16,7 @@
     }
 
+    /**
+        @brief Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList.
+    */
     MetaObjectList::~MetaObjectList()
     {
Index: code/branches/objecthierarchy/src/orxonox/core/MetaObjectList.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/MetaObjectList.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/MetaObjectList.h	(revision 365)
@@ -1,2 +1,11 @@
+/*!
+    @file MetaObjectList.h
+    @brief Definition of the MetaObjectList class.
+
+    The MetaObjectList is a single-linked list, containing all list-elements and their
+    lists wherein the object that owns the MetaObjectList is registered.
+    This allows much faster deleting of objects.
+*/
+
 #ifndef _MetaObjectList_H__
 #define _MetaObjectList_H__
@@ -7,10 +16,12 @@
 namespace orxonox
 {
+    //! Base-class of MetaObjectListElement, because those is a template
     class BaseMetaObjectListElement
     {
         public:
+            /** @brief Defaultdestructor */
             virtual ~BaseMetaObjectListElement() {};
 
-            BaseMetaObjectListElement* next_;
+            BaseMetaObjectListElement* next_;       //!< The next Element in the list
     };
 
@@ -18,4 +29,5 @@
     // ###  MetaObjectListElement  ###
     // ###############################
+    //! The list-element of the MetaObjectList
     template <class T>
     class MetaObjectListElement : public BaseMetaObjectListElement
@@ -25,8 +37,11 @@
             ~MetaObjectListElement();
 
-            ObjectListElement<T>* element_;
-            ObjectList<T>* list_;
+            ObjectListElement<T>* element_;         //!< The list element, containing the object
+            ObjectList<T>* list_;                   //!< The list, containing the element
     };
 
+    /**
+        @brief Constructor: Creates the list-element with given list and element.
+    */
     template <class T>
     MetaObjectListElement<T>::MetaObjectListElement(ObjectList<T>* list, ObjectListElement<T>* element)
@@ -37,4 +52,7 @@
     }
 
+    /**
+        @brief Destructor: Removes the ObjectListElement from the ObjectList by linking next_ and prev_ of the ObjectListElement.
+    */
     template <class T>
     MetaObjectListElement<T>::~MetaObjectListElement()
@@ -43,10 +61,10 @@
             this->element_->next_->prev_ = this->element_->prev_;
         else
-            this->list_->last_ = this->element_->prev_;
+            this->list_->last_ = this->element_->prev_; // If there is no next_, we deleted the last object and have to update the last_ pointer of the list
 
         if (this->element_->prev_)
             this->element_->prev_->next_ = this->element_->next_;
         else
-            this->list_->first_ = this->element_->next_;
+            this->list_->first_ = this->element_->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list
 
 
@@ -61,4 +79,10 @@
     // ###       ObjectList        ###
     // ###############################
+    //!  The MetaObjectList contains ObjectListElements and their ObjectLists.
+    /**
+        The MetaObjectList is a single-linked list, containing all list-elements and their
+        lists wherein the object that owns the MetaObjectList is registered.
+        This allows much faster deleting of objects.
+    */
     class MetaObjectList
     {
@@ -69,7 +93,12 @@
             void add(ObjectList<T>* list, ObjectListElement<T>* element);
 
-            BaseMetaObjectListElement* first_;
+            BaseMetaObjectListElement* first_;      //!< The first element in the list
     };
 
+    /**
+        @brief Adds an ObjectList and an element of that list to the MetaObjectList.
+        @param list The ObjectList wherein the element is
+        @param element The element wherein the object is
+    */
     template <class T>
     void MetaObjectList::add(ObjectList<T>* list, ObjectListElement<T>* element)
Index: code/branches/objecthierarchy/src/orxonox/core/ObjectList.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/ObjectList.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/ObjectList.h	(revision 365)
@@ -1,2 +1,11 @@
+/*!
+    @file ObjectList.h
+    @brief Definition of the ObjectList class.
+
+    The ObjectList is a double-linked list, used by Identifiers to store all objects of a specific class in it.
+    Created objects are added through the RegisterObject-macro in its constructor.
+    Use Iterator<class> to iterate through all objects of the class.
+*/
+
 #ifndef _ObjectList_H__
 #define _ObjectList_H__
@@ -4,9 +13,10 @@
 namespace orxonox
 {
-    class OrxonoxClass;
+    class OrxonoxClass; // Forward declaration
 
     // ###############################
     // ###    ObjectListElement    ###
     // ###############################
+    //! The list-element of the ObjectList
     template <class T>
     class ObjectListElement
@@ -14,11 +24,14 @@
         public:
             ObjectListElement(T* object);
-            ~ObjectListElement();
-
-            T* object_;
-            ObjectListElement* next_;
-            ObjectListElement* prev_;
+
+            T* object_;                     //!< The object
+            ObjectListElement* next_;       //!< The next element in the list
+            ObjectListElement* prev_;       //!< The previous element in the list
     };
 
+    /**
+        @brief Constructor: Creates the list-element with an object.
+        @param Object The object to store
+    */
     template <class T>
     ObjectListElement<T>::ObjectListElement(T* object)
@@ -29,9 +42,4 @@
     }
 
-    template <class T>
-    ObjectListElement<T>::~ObjectListElement()
-    {
-    }
-
 
     // ###############################
@@ -39,6 +47,11 @@
     // ###############################
     template <class T>
-    class Iterator;
-
+    class Iterator; // Forward declaration
+
+    //! The ObjectList contains all objects of a specific class.
+    /**
+        The ObjectList is used by Identifiers to store all objects of a specific class in it.
+        Use Iterator<class> to iterate through all objects in the list.
+    */
     template <class T>
     class ObjectList
@@ -48,21 +61,27 @@
             ~ObjectList();
             ObjectListElement<T>* add(T* object);
-            void remove(OrxonoxClass* object, bool bIterateForwards = true);
-
+//            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_;
-            ObjectListElement<T>* 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;
+            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;
-
+    ObjectList<T>* ObjectList<T>::pointer_s = 0; // Set the static member variable pointer_s to zero
+
+    /**
+        @brief Constructor: Sets first_ and last_ to zero and the static member variable pointer_s to _this_
+    */
     template <class T>
     ObjectList<T>::ObjectList()
@@ -71,7 +90,12 @@
         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;
     }
 
+    /**
+        @brief Destructor: Deletes all list-elements, but NOT THE OBJECTS.
+    */
     template <class T>
     ObjectList<T>::~ObjectList()
@@ -86,4 +110,9 @@
     }
 
+    /**
+        @brief Adds a new object to the end of the list.
+        @param object The object to add
+        @return The pointer to the new ObjectListElement, needed by the MetaObjectList of the added object
+    */
     template <class T>
     ObjectListElement<T>* ObjectList<T>::add(T* object)
@@ -91,9 +120,11 @@
         if (!this->last_)
         {
+            // If the list is empty
             this->last_ = new ObjectListElement<T>(object);
-            this->first_ = this->last_;
+            this->first_ = this->last_; // There's only one object in the list now
         }
         else
         {
+            // If the list isn't empty
             ObjectListElement<T>* temp = this->last_;
             this->last_ = new ObjectListElement<T>(object);
@@ -105,4 +136,11 @@
     }
 
+
+//    /**
+//        @brief Removes an object from the list.
+//        @param object The object to remove
+//        @param bIterateForwards If true: Start searching the object at the beginning of the list
+//    */
+    /*
     template <class T>
     void ObjectList<T>::remove(OrxonoxClass* object, bool bIterateForwards)
@@ -111,4 +149,5 @@
             return;
 
+        // If there's only one object in the list, we have to set first_ and last_ to zero
         if (this->first_ == this->last_)
         {
@@ -123,6 +162,10 @@
         }
 
+        // Now we are sure we have more than one element in the list
         if (bIterateForwards)
         {
+            // Start at the beginning of the list
+
+            // Check if it's the first object
             if (this->first_->object_ == object)
             {
@@ -135,4 +178,5 @@
             }
 
+            // Iterate through the whole list
             ObjectListElement<T>* temp = this->first_;
             while (temp->next_)
@@ -146,5 +190,5 @@
                         temp2->prev_ = temp;
                     else
-                        this->last_ = temp;
+                        this->last_ = temp; // If there is no next_, we deleted the last element and have to update the last_ pointer.
 
                     return;
@@ -156,4 +200,7 @@
         else
         {
+            // Start at the end of the list
+
+            // Check if it's the last object
             if (this->last_->object_ == object)
             {
@@ -166,4 +213,5 @@
             }
 
+            // Iterate through the whole list
             ObjectListElement<T>* temp = this->last_;
             while (temp->prev_)
@@ -177,5 +225,5 @@
                         temp2->next_ = temp;
                     else
-                        this->first_ = temp;
+                        this->first_ = temp; // If there is no prev_, we deleted the first element and have to update the first_ pointer.
 
                     return;
@@ -186,4 +234,5 @@
         }
     }
+    */
 }
 
Index: code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.cc	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.cc	(revision 365)
@@ -1,20 +1,24 @@
+/*!
+    @file OrxonoxClass.cc
+    @brief Implementation of the OrxonoxClass Class.
+*/
+
 #include "OrxonoxClass.h"
 
 namespace orxonox
 {
+    /** @brief Constructor: Sets identifier_ and parents_ to zero. */
     OrxonoxClass::OrxonoxClass()
     {
         this->identifier_ = 0;
         this->parents_ = 0;
-
-        this->metaList_ = new MetaObjectList;
     }
 
+    /** @brief Destructor: Deletes, if existing, the list of the parents. */
     OrxonoxClass::~OrxonoxClass()
     {
+        // parents_ exists only if isCreatingHierarchy() of the associated Identifier returned true while creating the class
         if (this->parents_)
             delete this->parents_;
-
-        delete this->metaList_;
     }
 }
Index: code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.h	(revision 362)
+++ code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.h	(revision 365)
@@ -1,2 +1,10 @@
+/*!
+    @file OrxonoxClass.h
+    @brief Definition of the OrxonoxClass Class.
+
+    All objects and interfaces of the game-logic are derived from OrxonoxClass.
+    It stores the Identifier and the MetaObjectList and has all needed functions to create the class-hierarchy.
+*/
+
 #ifndef _OrxonoxClass_H__
 #define _OrxonoxClass_H__
@@ -9,4 +17,9 @@
 namespace orxonox
 {
+    //! The class all objects and interfaces of the game-logic are derived from.
+    /**
+        BaseObject and Interaces are derived with 'virtual public OrxonoxClass' from OrxonoxClass.
+        OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList.
+    */
     class OrxonoxClass
     {
@@ -14,14 +27,24 @@
             OrxonoxClass();
             virtual ~OrxonoxClass();
+
+            /** @returns the Identifier of the object */
             inline Identifier* getIdentifier() const { return this->identifier_; }
+
+            /** @brief Sets the Identifier of the object. Used by the RegisterObject-macro. */
             inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }
+
+            /** @returns the list of all parents of the object */
             inline IdentifierList* getParents() const { return this->parents_; }
+
+            /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */
             inline void setParents(IdentifierList* parents) { this->parents_ = parents; }
-            inline MetaObjectList* getMetaList() { return this->metaList_; }
+
+            /** @returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. */
+            inline MetaObjectList& getMetaList() { return this->metaList_; }
 
         private:
-            Identifier* identifier_;
-            IdentifierList* parents_;
-            MetaObjectList* metaList_;
+            Identifier* identifier_;        //!< The Identifier of the object
+            IdentifierList* parents_;       //!< List of all parents of the object
+            MetaObjectList metaList_;       //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
     };
 }
