Index: code/trunk/src/core/CoreIncludes.h
===================================================================
--- code/trunk/src/core/CoreIncludes.h	(revision 1854)
+++ code/trunk/src/core/CoreIncludes.h	(revision 1856)
@@ -94,4 +94,11 @@
 
 /**
+    @brief Creates the entry in the Factory.
+    @param ClassName The name of the class
+*/
+#define CreateFactory(ClassName) \
+    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
+
+/**
     @brief Returns the Identifier of the given class.
     @param ClassName The name of the class
@@ -101,16 +108,16 @@
 
 /**
-    @brief Creates the entry in the Factory.
-    @param ClassName The name of the class
+    @brief Returns the Identifier with a given name through the factory.
+    @param String The name of the class
 */
-#define CreateFactory(ClassName) \
-    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
+#define ClassByName(String) \
+    orxonox::Factory::getIdentifier(String)
 
 /**
-    @brief Returns the Identifier with either a given name or a given network ID through the factory.
-    @param StringOrInt The name or the network ID of the class
+    @brief Returns the Identifier with a given network ID through the factory.
+    @param networkID The network ID of the class
 */
-#define GetIdentifier(StringOrInt) \
-    orxonox::Factory::getIdentifier(StringOrInt)
+#define ClassByID(networkID) \
+    orxonox::Factory::getIdentifier(networkID)
 
 #endif /* _CoreIncludes_H__ */
Index: code/trunk/src/core/Factory.cc
===================================================================
--- code/trunk/src/core/Factory.cc	(revision 1854)
+++ code/trunk/src/core/Factory.cc	(revision 1856)
@@ -110,21 +110,3 @@
       return &theOneAndOnlyFactoryInstance;
     }
-
-    /**
-        @brief Returns the begin-iterator of the factory-map.
-        @return The begin-iterator
-    */
-    std::map<std::string, Identifier*>::const_iterator Factory::getFactoryBegin()
-    {
-        return Factory::getFactoryPointer()->identifierStringMap_.begin();
-    }
-
-    /**
-        @brief Returns the end-iterator of the factory-map.
-        @return The end-iterator
-    */
-    std::map<std::string, Identifier*>::const_iterator Factory::getFactoryEnd()
-    {
-        return Factory::getFactoryPointer()->identifierStringMap_.end();
-    }
 }
Index: code/trunk/src/core/Factory.h
===================================================================
--- code/trunk/src/core/Factory.h	(revision 1854)
+++ code/trunk/src/core/Factory.h	(revision 1856)
@@ -66,6 +66,14 @@
 
             static Factory* getFactoryPointer();    // avoid overriding order problem in the static intialisation process
-            static std::map<std::string, Identifier*>::const_iterator getFactoryBegin();
-            static std::map<std::string, Identifier*>::const_iterator getFactoryEnd();
+
+            /** @brief Returns the factory-map. */
+            static const std::map<std::string, Identifier*>& getFacbtoryMap()
+                { return Factory::getFactoryPointer()->identifierStringMap_; }
+            /** @brief Returns the begin-iterator of the factory-map. */
+            static std::map<std::string, Identifier*>::const_iterator getFactoryMapBegin()
+                { return Factory::getFactoryPointer()->identifierStringMap_.begin(); }
+            /** @brief Returns the end-iterator of the factory-map. */
+            static std::map<std::string, Identifier*>::const_iterator getFactoryMapEnd()
+                { return Factory::getFactoryPointer()->identifierStringMap_.end(); }
 
         private:
Index: code/trunk/src/core/Identifier.cc
===================================================================
--- code/trunk/src/core/Identifier.cc	(revision 1854)
+++ code/trunk/src/core/Identifier.cc	(revision 1856)
@@ -115,4 +115,23 @@
             identifiers[name] = proposal;
             return proposal;
+        }
+    }
+
+    /**
+        @brief Registers a class, which means that the name and the parents get stored.
+        @param parents A list, containing the Identifiers of all parents of the class
+        @param bRootClass True if the class is either an Interface or the BaseObject itself
+    */
+    void Identifier::initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass)
+    {
+        // Check if at least one object of the given type was created
+        if (!this->bCreatedOneObject_ && Identifier::isCreatingHierarchy())
+        {
+            // If no: We have to store the informations and initialize the Identifier
+            COUT(4) << "*** ClassIdentifier: Register Class in " << this->getName() << "-Singleton -> Initialize Singleton." << std::endl;
+            if (bRootClass)
+                this->initialize(0); // 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
+                this->initialize(parents);
         }
     }
Index: code/trunk/src/core/Identifier.h
===================================================================
--- code/trunk/src/core/Identifier.h	(revision 1854)
+++ code/trunk/src/core/Identifier.h	(revision 1856)
@@ -190,4 +190,17 @@
             inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }
 
+            /** @brief Returns the map that stores all XMLPort params. @return The const_iterator */
+            inline const std::map<std::string, XMLPortParamContainer*>& getXMLPortParamMap() const { return this->xmlportParamContainers_; }
+            /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort params. @return The const_iterator */
+            inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapBegin() const { return this->xmlportParamContainers_.begin(); }
+            /** @brief Returns a const_iterator to the end of the map that stores all XMLPort params. @return The const_iterator */
+            inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapEnd() const { return this->xmlportParamContainers_.end(); }
+
+            /** @brief Returns the map that stores all XMLPort objects. @return The const_iterator */
+            inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortObjectMap() const { return this->xmlportObjectContainers_; }
+            /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort objects. @return The const_iterator */
+            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapBegin() const { return this->xmlportObjectContainers_.begin(); }
+            /** @brief Returns a const_iterator to the end of the map that stores all XMLPort objects. @return The const_iterator */
+            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapEnd() const { return this->xmlportObjectContainers_.end(); }
 
             /** @brief Returns true if this class has at least one config value. @return True if this class has at least one config value */
@@ -219,4 +232,6 @@
             ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
 
+            void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
+
         protected:
             Identifier();
@@ -224,7 +239,5 @@
             virtual ~Identifier();
 
-            void initialize(std::set<const Identifier*>* parents);
             static Identifier* getIdentifierSingleton(const std::string& name, Identifier* proposal);
-
             virtual void createSuperFunctionCaller() const = 0;
 
@@ -239,5 +252,4 @@
             inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
 
-            bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
             ObjectListBase* objects_;                                      //!< The list of all objects of this class
 
@@ -261,4 +273,6 @@
             }
 
+            void initialize(std::set<const Identifier*>* parents);
+
             static void destroyAllIdentifiers();
 
@@ -269,4 +283,5 @@
             std::set<const Identifier*>* directChildren_;                  //!< The direct children of the class the Identifier belongs to
 
+            bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
             bool bSetName_;                                                //!< True if the name is set
             std::string name_;                                             //!< The name of the class the Identifier belongs to
@@ -311,7 +326,6 @@
             static ClassIdentifier<T> *getIdentifier();
             static ClassIdentifier<T> *getIdentifier(const std::string& name);
-            void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
+            void addObject(T* object);
             static bool isFirstCall();
-            void addObject(T* object);
 
             void updateConfigValues(bool updateChildren = true) const;
@@ -328,29 +342,9 @@
             }
 
-            static ClassIdentifier<T> *classIdentifier_s;
+            static ClassIdentifier<T>* classIdentifier_s;
     };
 
     template <class T>
-    ClassIdentifier<T> *ClassIdentifier<T>::classIdentifier_s = 0;
-
-    /**
-        @brief Registers a class, which means that the name and the parents get stored.
-        @param parents A list, containing the Identifiers of all parents of the class
-        @param bRootClass True if the class is either an Interface or the BaseObject itself
-    */
-    template <class T>
-    void ClassIdentifier<T>::initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass)
-    {
-        // Check if at least one object of the given type was created
-        if (!this->bCreatedOneObject_ && Identifier::isCreatingHierarchy())
-        {
-            // If no: We have to store the informations and initialize the Identifier
-            COUT(4) << "*** ClassIdentifier: Register Class in " << this->getName() << "-Singleton -> Initialize Singleton." << std::endl;
-            if (bRootClass)
-                this->initialize(0); // 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
-                this->initialize(parents);
-        }
-    }
+    ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s;
 
     /**
@@ -476,5 +470,5 @@
             SubclassIdentifier(Identifier* identifier)
             {
-                this->identifier_ = identifier;
+                this->operator=(identifier);
             }
 
@@ -500,7 +494,6 @@
             /**
                 @brief Overloading of the * operator: returns the assigned identifier.
-                @return The assigned identifier
-            */
-            Identifier* operator*()
+            */
+            inline Identifier* operator*()
             {
                 return this->identifier_;
@@ -509,7 +502,14 @@
             /**
                 @brief Overloading of the -> operator: returns the assigned identifier.
-                @return The assigned identifier
-            */
-            Identifier* operator->() const
+            */
+            inline Identifier* operator->() const
+            {
+                return this->identifier_;
+            }
+
+            /**
+                @brief Returns the assigned identifier. This allows you to assign a SubclassIdentifier to a normal Identifier*.
+            */
+            inline operator Identifier*() const
             {
                 return this->identifier_;
@@ -527,6 +527,5 @@
                 if (newObject)
                 {
-                    // Do a dynamic_cast, because an object of type T is much better than of type BaseObject
-                    return (T*)(newObject);
+                    return dynamic_cast<T*>(newObject);
                 }
                 else
@@ -552,30 +551,30 @@
 
             /** @brief Returns the assigned identifier. @return The identifier */
-            inline const Identifier* getIdentifier() const
+            inline Identifier* getIdentifier() const
                 { return this->identifier_; }
 
-            /** @brief 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); }
-
-            /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
-            inline bool isExactlyA(const Identifier* identifier) const
-                { return this->identifier_->isExactlyA(identifier); }
-
-            /** @brief 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); }
-
-            /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */
-            inline bool isDirectChildOf(const Identifier* identifier) const
-                { return this->identifier_->isDirectChildOf(identifier); }
-
-            /** @brief 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); }
-
-            /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */
-            inline bool isDirectParentOf(const Identifier* identifier) const
-                { return this->identifier_->isDirectParentOf(identifier); }
+//            /** @brief 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); }
+//
+//            /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
+//            inline bool isExactlyA(const Identifier* identifier) const
+//                { return this->identifier_->isExactlyA(identifier); }
+//
+//            /** @brief 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); }
+//
+//            /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */
+//            inline bool isDirectChildOf(const Identifier* identifier) const
+//                { return this->identifier_->isDirectChildOf(identifier); }
+//
+//            /** @brief 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); }
+//
+//            /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */
+//            inline bool isDirectParentOf(const Identifier* identifier) const
+//                { return this->identifier_->isDirectParentOf(identifier); }
 
         private:
Index: code/trunk/src/core/XMLPort.h
===================================================================
--- code/trunk/src/core/XMLPort.h	(revision 1854)
+++ code/trunk/src/core/XMLPort.h	(revision 1856)
@@ -468,5 +468,5 @@
                             for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
                             {
-                                Identifier* identifier = GetIdentifier(child->Value());
+                                Identifier* identifier = ClassByName(child->Value());
                                 if (identifier)
                                 {
Index: code/trunk/src/network/ConnectionManager.cc
===================================================================
--- code/trunk/src/network/ConnectionManager.cc	(revision 1854)
+++ code/trunk/src/network/ConnectionManager.cc	(revision 1856)
@@ -345,6 +345,6 @@
     std::string classname;
     orxonox::Identifier *id;
-    std::map<std::string, orxonox::Identifier*>::const_iterator it = orxonox::Factory::getFactoryBegin();
-    while(it != orxonox::Factory::getFactoryEnd()){
+    std::map<std::string, orxonox::Identifier*>::const_iterator it = orxonox::Factory::getFactoryMapBegin();
+    while(it != orxonox::Factory::getFactoryMapEnd()){
       id = (*it).second;
       if(id == NULL)
Index: code/trunk/src/network/Server.cc
===================================================================
--- code/trunk/src/network/Server.cc	(revision 1854)
+++ code/trunk/src/network/Server.cc	(revision 1856)
@@ -340,5 +340,5 @@
     if(!client)
       return false;
-    orxonox::Identifier* id = GetIdentifier("SpaceShip");
+    orxonox::Identifier* id = ClassByName("SpaceShip");
     if(!id){
       COUT(4) << "We could not create the SpaceShip for client: " << client->getID() << std::endl;
Index: code/trunk/src/network/Synchronisable.cc
===================================================================
--- code/trunk/src/network/Synchronisable.cc	(revision 1854)
+++ code/trunk/src/network/Synchronisable.cc	(revision 1856)
@@ -83,5 +83,5 @@
   }
 
-  
+
   void Synchronisable::setClient(bool b){
     if(b) // client
@@ -90,5 +90,5 @@
       state_=0x1;
   }
-  
+
   bool Synchronisable::fabricate(unsigned char*& mem, int mode)
   {
@@ -97,11 +97,11 @@
     objectID = *(unsigned int*)(mem+sizeof(unsigned int));
     classID = *(unsigned int*)(mem+2*sizeof(unsigned int));
-    
+
     if(size==3*sizeof(unsigned int)){ //not our turn, dont do anything
       mem+=3*sizeof(unsigned int);
       return true;
     }
-    
-    orxonox::Identifier* id = GetIdentifier(classID);
+
+    orxonox::Identifier* id = ClassByID(classID);
     if(!id){
       COUT(3) << "We could not identify a new object; classid: " << classID << " uint: " << (unsigned int)classID << " objectID: " << objectID << " size: " << size << std::endl;
@@ -149,5 +149,5 @@
     syncList->push_back(temp);
   }
-  
+
   /**
    * This function takes all SynchronisableVariables out of the Synchronisable and saves it into a syncData struct
@@ -171,5 +171,5 @@
     unsigned int size;
     size=getSize2(id, mode);
-    
+
     // start copy header
     memcpy(mem, &size, sizeof(unsigned int));
@@ -181,9 +181,9 @@
     tempsize+=12;
     // end copy header
-    
+
     //if this tick is we dont synchronise, then abort now
     if(!isMyTick(id))
       return true;
-    
+
     COUT(5) << "Synchronisable getting data from objectID: " << objectID << " classID: " << classID << " length: " << size << std::endl;
     // copy to location
@@ -215,5 +215,5 @@
   }
 
-  
+
   /**
    * This function takes a syncData struct and takes it to update the variables
@@ -230,5 +230,5 @@
       return false;
     }
-    
+
     // start extract header
     unsigned int objectID, classID, size;
@@ -245,5 +245,5 @@
       return true;
       //assert(0);
-    
+
     COUT(5) << "Synchronisable: objectID " << objectID << ", classID " << classID << " size: " << size << " synchronising data" << std::endl;
     for(i=syncList->begin(); i!=syncList->end() && mem <= data+size; i++){
@@ -317,9 +317,9 @@
     return sizeof(synchronisableHeader) + getSize( id, mode );
   }
-  
-  /**
-   * 
-   * @param id 
-   * @return 
+
+  /**
+   *
+   * @param id
+   * @return
    */
   bool Synchronisable::isMyTick(unsigned int id){
@@ -327,5 +327,5 @@
     return ( id==0 || id%objectFrequency_==objectID%objectFrequency_ ) && ((objectMode_&state_)!=0);
   }
-  
+
   bool Synchronisable::isMyData(unsigned char* mem)
   {
@@ -337,9 +337,9 @@
     classID = *(int *)mem;
     mem+=sizeof(classID);
-    
+
     assert(classID == this->classID);
     return (objectID == this->objectID);
   }
-  
+
   void Synchronisable::setObjectMode(int mode){
     assert(mode==0x1 || mode==0x2 || mode==0x3);
Index: code/trunk/src/network/packet/ClassID.cc
===================================================================
--- code/trunk/src/network/packet/ClassID.cc	(revision 1854)
+++ code/trunk/src/network/packet/ClassID.cc	(revision 1856)
@@ -42,5 +42,5 @@
 #define _CLASSNAMELENGTH      _CLASSID + sizeof(unsigned int)
 #define _CLASSNAME            _CLASSNAMELENGTH + sizeof(classNameLength_)
-  
+
   ClassID::ClassID( unsigned int classID, std::string className )
  : Packet()
@@ -73,5 +73,5 @@
 bool ClassID::process(){
   COUT(3) << "processing classid: " << getClassID() << " name: " << (const char*)(data_+_CLASSNAME) << std::endl;
-  orxonox::Identifier *id=GetIdentifier( std::string((const char*)(data_+_CLASSNAME) ));
+  orxonox::Identifier *id=ClassByID( std::string((const char*)(data_+_CLASSNAME) ));
   if(id==NULL)
     return false;
