Index: /code/branches/pch/src/core/ArgumentCompletionFunctions.cc
===================================================================
--- /code/branches/pch/src/core/ArgumentCompletionFunctions.cc	(revision 3153)
+++ /code/branches/pch/src/core/ArgumentCompletionFunctions.cc	(revision 3154)
@@ -29,15 +29,13 @@
 #include "ArgumentCompletionFunctions.h"
 
-#include <iostream>
 #include <map>
 #include <boost/version.hpp>
 #include <boost/filesystem.hpp>
 
-#include "CoreIncludes.h"
+#include "util/Convert.h"
+#include "util/String.h"
 #include "Identifier.h"
 #include "ConfigValueContainer.h"
 #include "TclThreadManager.h"
-#include "util/Convert.h"
-#include "util/String.h"
 
 // Boost 1.36 has some issues with deprecated functions that have been omitted
Index: /code/branches/pch/src/core/ArgumentCompletionListElement.h
===================================================================
--- /code/branches/pch/src/core/ArgumentCompletionListElement.h	(revision 3153)
+++ /code/branches/pch/src/core/ArgumentCompletionListElement.h	(revision 3154)
@@ -32,7 +32,6 @@
 #include "CorePrereqs.h"
 
+#include <list>
 #include <string>
-#include <list>
-
 
 namespace orxonox
Index: /code/branches/pch/src/core/BaseObject.cc
===================================================================
--- /code/branches/pch/src/core/BaseObject.cc	(revision 3153)
+++ /code/branches/pch/src/core/BaseObject.cc	(revision 3154)
@@ -36,13 +36,14 @@
 #include <tinyxml/tinyxml.h>
 
+#include "util/String.h"
 #include "CoreIncludes.h"
+#include "Event.h"
 #include "EventIncludes.h"
 #include "Functor.h"
-#include "XMLPort.h"
+#include "Iterator.h"
+#include "Template.h"
 #include "XMLFile.h"
 #include "XMLNameListener.h"
-#include "Template.h"
-#include "util/String.h"
-#include "util/mbool.h"
+#include "XMLPort.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/BaseObject.h
===================================================================
--- /code/branches/pch/src/core/BaseObject.h	(revision 3153)
+++ /code/branches/pch/src/core/BaseObject.h	(revision 3154)
@@ -44,14 +44,14 @@
     }
 
+
+#include "CorePrereqs.h"
+
 #include <map>
 #include <list>
 
-#include "CorePrereqs.h"
-
+#include "util/mbool.h"
+#include "OrxonoxClass.h"
 #include "Super.h"
-#include "OrxonoxClass.h"
 #include "XMLIncludes.h"
-#include "Event.h"
-#include "util/mbool.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/ClassFactory.h
===================================================================
--- /code/branches/pch/src/core/ClassFactory.h	(revision 3153)
+++ /code/branches/pch/src/core/ClassFactory.h	(revision 3154)
@@ -41,7 +41,7 @@
 #include <string>
 
+#include "util/Debug.h"
 #include "Factory.h"
 #include "Identifier.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/ClassTreeMask.cc
===================================================================
--- /code/branches/pch/src/core/ClassTreeMask.cc	(revision 3153)
+++ /code/branches/pch/src/core/ClassTreeMask.cc	(revision 3154)
@@ -34,5 +34,4 @@
 #include "ClassTreeMask.h"
 #include "Identifier.h"
-#include "BaseObject.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/ClassTreeMask.h
===================================================================
--- /code/branches/pch/src/core/ClassTreeMask.h	(revision 3153)
+++ /code/branches/pch/src/core/ClassTreeMask.h	(revision 3154)
@@ -75,7 +75,6 @@
 #include <list>
 #include <stack>
-
+#include "BaseObject.h"
 #include "Iterator.h"
-#include "BaseObject.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/CommandEvaluation.cc
===================================================================
--- /code/branches/pch/src/core/CommandEvaluation.cc	(revision 3153)
+++ /code/branches/pch/src/core/CommandEvaluation.cc	(revision 3154)
@@ -28,8 +28,9 @@
 
 #include "CommandEvaluation.h"
+
+#include "util/Debug.h"
+#include "util/String.h"
 #include "ConsoleCommand.h"
 #include "Identifier.h"
-#include "util/Debug.h"
-#include "util/String.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/CommandExecutor.cc
===================================================================
--- /code/branches/pch/src/core/CommandExecutor.cc	(revision 3153)
+++ /code/branches/pch/src/core/CommandExecutor.cc	(revision 3154)
@@ -28,7 +28,8 @@
 
 #include "CommandExecutor.h"
+
+#include "util/Debug.h"
+#include "util/String.h"
 #include "ConsoleCommand.h"
-#include "util/String.h"
-#include "util/Debug.h"
 #include "Identifier.h"
 #include "Language.h"
Index: /code/branches/pch/src/core/CommandExecutor.h
===================================================================
--- /code/branches/pch/src/core/CommandExecutor.h	(revision 3153)
+++ /code/branches/pch/src/core/CommandExecutor.h	(revision 3154)
@@ -34,4 +34,7 @@
 #include <map>
 #include <set>
+#include <string>
+
+#include "util/MultiType.h"
 #include "CommandEvaluation.h"
 
Index: /code/branches/pch/src/core/CommandLine.cc
===================================================================
--- /code/branches/pch/src/core/CommandLine.cc	(revision 3153)
+++ /code/branches/pch/src/core/CommandLine.cc	(revision 3154)
@@ -31,4 +31,6 @@
 #include <boost/filesystem.hpp>
 
+#include "util/Convert.h"
+#include "util/Debug.h"
 #include "util/Exception.h"
 #include "util/String.h"
Index: /code/branches/pch/src/core/CommandLine.h
===================================================================
--- /code/branches/pch/src/core/CommandLine.h	(revision 3153)
+++ /code/branches/pch/src/core/CommandLine.h	(revision 3154)
@@ -31,7 +31,6 @@
 
 #include "CorePrereqs.h"
+
 #include <map>
-#include "util/Convert.h"
-#include "util/Debug.h"
 #include "util/OrxAssert.h"
 #include "util/MultiType.h"
Index: /code/branches/pch/src/core/ConfigFileManager.cc
===================================================================
--- /code/branches/pch/src/core/ConfigFileManager.cc	(revision 3153)
+++ /code/branches/pch/src/core/ConfigFileManager.cc	(revision 3154)
@@ -29,8 +29,8 @@
 #include "ConfigFileManager.h"
 
-#include <cassert>
 #include <boost/filesystem.hpp>
 
 #include "util/Convert.h"
+#include "util/Math.h"
 #include "util/String.h"
 #include "ConsoleCommand.h"
Index: /code/branches/pch/src/core/ConfigFileManager.h
===================================================================
--- /code/branches/pch/src/core/ConfigFileManager.h	(revision 3153)
+++ /code/branches/pch/src/core/ConfigFileManager.h	(revision 3154)
@@ -32,10 +32,9 @@
 #include "CorePrereqs.h"
 
-#include <iostream>
+#include <cassert>
 #include <string>
 #include <list>
 #include <map>
 
-#include "util/Math.h"
 #include "util/OrxEnum.h"
 
Index: /code/branches/pch/src/core/ConfigValueContainer.cc
===================================================================
--- /code/branches/pch/src/core/ConfigValueContainer.cc	(revision 3153)
+++ /code/branches/pch/src/core/ConfigValueContainer.cc	(revision 3154)
@@ -34,12 +34,7 @@
 #include "ConfigValueContainer.h"
 
-#include <fstream>
-
+#include "util/Convert.h"
 #include "util/SubString.h"
-#include "util/Convert.h"
 #include "Language.h"
-#include "Identifier.h"
-
-
 
 namespace orxonox
Index: /code/branches/pch/src/core/ConfigValueContainer.h
===================================================================
--- /code/branches/pch/src/core/ConfigValueContainer.h	(revision 3153)
+++ /code/branches/pch/src/core/ConfigValueContainer.h	(revision 3154)
@@ -49,5 +49,4 @@
 #include <vector>
 
-#include "util/Math.h"
 #include "util/MultiType.h"
 #include "ConfigFileManager.h"
Index: /code/branches/pch/src/core/ConsoleCommand.h
===================================================================
--- /code/branches/pch/src/core/ConsoleCommand.h	(revision 3153)
+++ /code/branches/pch/src/core/ConsoleCommand.h	(revision 3154)
@@ -32,8 +32,8 @@
 #include "CorePrereqs.h"
 
+#include "ArgumentCompletionFunctions.h"
+#include "CommandExecutor.h"
 #include "Executor.h"
 #include "Identifier.h"
-#include "CommandExecutor.h"
-#include "ArgumentCompletionFunctions.h"
 
 
Index: /code/branches/pch/src/core/ConsoleCommandCompilation.cc
===================================================================
--- /code/branches/pch/src/core/ConsoleCommandCompilation.cc	(revision 3153)
+++ /code/branches/pch/src/core/ConsoleCommandCompilation.cc	(revision 3154)
@@ -28,7 +28,12 @@
 
 #include "ConsoleCommandCompilation.h"
-#include "ConsoleCommand.h"
+
+#include <fstream>
+#include <set>
+#include <string>
+
 #include "util/Debug.h"
 #include "util/ExprParser.h"
+#include "ConsoleCommand.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/ConsoleCommandCompilation.h
===================================================================
--- /code/branches/pch/src/core/ConsoleCommandCompilation.h	(revision 3153)
+++ /code/branches/pch/src/core/ConsoleCommandCompilation.h	(revision 3154)
@@ -32,6 +32,4 @@
 #include "CorePrereqs.h"
 
-#include <string>
-
 namespace orxonox
 {
Index: /code/branches/pch/src/core/CorePrereqs.h
===================================================================
--- /code/branches/pch/src/core/CorePrereqs.h	(revision 3153)
+++ /code/branches/pch/src/core/CorePrereqs.h	(revision 3154)
@@ -36,6 +36,4 @@
 
 #include "OrxonoxConfig.h"
-
-#include <string>
 
 //-----------------------------------------------------------------------
@@ -190,3 +188,10 @@
 }
 
+// CppTcl
+namespace Tcl
+{
+    class interpreter;
+    class object;
+}
+
 #endif /* _CorePrereqs_H__ */
Index: /code/branches/pch/src/core/Event.cc
===================================================================
--- /code/branches/pch/src/core/Event.cc	(revision 3153)
+++ /code/branches/pch/src/core/Event.cc	(revision 3154)
@@ -28,4 +28,5 @@
 
 #include "Event.h"
+
 #include "BaseObject.h"
 #include "Executor.h"
Index: /code/branches/pch/src/core/Event.h
===================================================================
--- /code/branches/pch/src/core/Event.h	(revision 3153)
+++ /code/branches/pch/src/core/Event.h	(revision 3154)
@@ -31,4 +31,5 @@
 
 #include "CorePrereqs.h"
+#include <string>
 
 namespace orxonox
Index: /code/branches/pch/src/core/Executor.cc
===================================================================
--- /code/branches/pch/src/core/Executor.cc	(revision 3153)
+++ /code/branches/pch/src/core/Executor.cc	(revision 3154)
@@ -29,5 +29,5 @@
 
 #include "Executor.h"
-#include "util/Math.h"
+
 #include "util/Convert.h"
 #include "Language.h"
Index: /code/branches/pch/src/core/Executor.h
===================================================================
--- /code/branches/pch/src/core/Executor.h	(revision 3153)
+++ /code/branches/pch/src/core/Executor.h	(revision 3154)
@@ -33,9 +33,9 @@
 #include "CorePrereqs.h"
 
+#include "util/Debug.h"
+#include "util/Math.h"
+#include "util/String.h"
 #include "util/SubString.h"
-#include "util/String.h"
-#include "util/Math.h"
 #include "Functor.h"
-#include "util/Debug.h"
 
 
Index: /code/branches/pch/src/core/Factory.cc
===================================================================
--- /code/branches/pch/src/core/Factory.cc	(revision 3153)
+++ /code/branches/pch/src/core/Factory.cc	(revision 3154)
@@ -33,7 +33,8 @@
 
 #include "Factory.h"
+
+#include "util/Debug.h"
 #include "Identifier.h"
 #include "BaseObject.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/Functor.h
===================================================================
--- /code/branches/pch/src/core/Functor.h	(revision 3153)
+++ /code/branches/pch/src/core/Functor.h	(revision 3154)
@@ -33,8 +33,7 @@
 #include "CorePrereqs.h"
 
+#include "util/Debug.h"
 #include "util/MultiType.h"
 #include "util/String.h"
-#include "util/Debug.h"
-
 
 namespace orxonox
Index: /code/branches/pch/src/core/Game.cc
===================================================================
--- /code/branches/pch/src/core/Game.cc	(revision 3153)
+++ /code/branches/pch/src/core/Game.cc	(revision 3154)
@@ -36,5 +36,4 @@
 
 #include <exception>
-#include <cassert>
 #include <boost/weak_ptr.hpp>
 
Index: /code/branches/pch/src/core/Game.h
===================================================================
--- /code/branches/pch/src/core/Game.h	(revision 3153)
+++ /code/branches/pch/src/core/Game.h	(revision 3154)
@@ -37,4 +37,5 @@
 
 #include "CorePrereqs.h"
+
 #include <cassert>
 #include <list>
@@ -42,4 +43,5 @@
 #include <vector>
 #include <boost/shared_ptr.hpp>
+
 #include "OrxonoxClass.h"
 
Index: /code/branches/pch/src/core/GameState.cc
===================================================================
--- /code/branches/pch/src/core/GameState.cc	(revision 3153)
+++ /code/branches/pch/src/core/GameState.cc	(revision 3154)
@@ -34,8 +34,8 @@
 
 #include "GameState.h"
+
 #include "util/Debug.h"
 #include "util/Exception.h"
 #include "util/OrxAssert.h"
-#include "Clock.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/GameState.h
===================================================================
--- /code/branches/pch/src/core/GameState.h	(revision 3153)
+++ /code/branches/pch/src/core/GameState.h	(revision 3154)
@@ -38,7 +38,6 @@
 #include "CorePrereqs.h"
 
+#include <map>
 #include <string>
-#include <map>
-#include "CorePrereqs.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/IRC.cc
===================================================================
--- /code/branches/pch/src/core/IRC.cc	(revision 3153)
+++ /code/branches/pch/src/core/IRC.cc	(revision 3154)
@@ -29,10 +29,10 @@
 #include "IRC.h"
 
-#include <boost/thread/thread.hpp>
+#include <cpptcl/cpptcl.h>
+
+#include "util/Convert.h"
 #include "ConsoleCommand.h"
+#include "CoreIncludes.h"
 #include "TclThreadManager.h"
-#include "CoreIncludes.h"
-#include "util/Convert.h"
-
 
 namespace orxonox
Index: /code/branches/pch/src/core/IRC.h
===================================================================
--- /code/branches/pch/src/core/IRC.h	(revision 3153)
+++ /code/branches/pch/src/core/IRC.h	(revision 3154)
@@ -31,6 +31,4 @@
 
 #include "CorePrereqs.h"
-
-#include <cpptcl/cpptcl.h>
 #include "OrxonoxClass.h"
 
Index: /code/branches/pch/src/core/Identifier.cc
===================================================================
--- /code/branches/pch/src/core/Identifier.cc	(revision 3153)
+++ /code/branches/pch/src/core/Identifier.cc	(revision 3154)
@@ -36,8 +36,8 @@
 #include <ostream>
 
-#include "Factory.h"
+#include "util/String.h"
 #include "ConfigValueContainer.h"
 #include "ConsoleCommand.h"
-#include "CommandExecutor.h"
+#include "Factory.h"
 #include "XMLPort.h"
 
Index: /code/branches/pch/src/core/Identifier.h
===================================================================
--- /code/branches/pch/src/core/Identifier.h	(revision 3153)
+++ /code/branches/pch/src/core/Identifier.h	(revision 3154)
@@ -55,19 +55,15 @@
 #include "CorePrereqs.h"
 
+#include <cassert>
+#include <map>
 #include <set>
-#include <map>
-#include <vector>
 #include <string>
-#include <utility>
 #include <typeinfo>
-#include <cstdlib>
-#include <cassert>
-
+
+#include "util/Debug.h"
 #include "MetaObjectList.h"
-#include "Iterator.h"
+#include "ObjectList.h"
+#include "ObjectListBase.h"
 #include "Super.h"
-#include "Functor.h"
-#include "util/Debug.h"
-#include "util/String.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/Iterator.h
===================================================================
--- /code/branches/pch/src/core/Iterator.h	(revision 3153)
+++ /code/branches/pch/src/core/Iterator.h	(revision 3154)
@@ -47,7 +47,6 @@
 #include "CorePrereqs.h"
 
+#include "Identifier.h"
 #include "ObjectListBase.h"
-#include "ObjectListIterator.h"
-#include "OrxonoxClass.h"
 
 namespace orxonox
@@ -305,6 +304,3 @@
 }
 
-// Include ObjectList.h so the user only has to include one file: Iterator.h
-#include "ObjectList.h"
-
 #endif /* _Iterator_H__ */
Index: /code/branches/pch/src/core/Language.cc
===================================================================
--- /code/branches/pch/src/core/Language.cc	(revision 3153)
+++ /code/branches/pch/src/core/Language.cc	(revision 3154)
@@ -37,6 +37,6 @@
 #include <boost/filesystem.hpp>
 
+#include "util/Debug.h"
 #include "Core.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/Loader.cc
===================================================================
--- /code/branches/pch/src/core/Loader.cc	(revision 3153)
+++ /code/branches/pch/src/core/Loader.cc	(revision 3154)
@@ -32,15 +32,13 @@
 #include <boost/filesystem.hpp>
 
-#include "XMLFile.h"
+#include "util/Debug.h"
+#include "util/Exception.h"
 #include "BaseObject.h"
-#include "Identifier.h"
+#include "Core.h"
 #include "Iterator.h"
 #include "ObjectList.h"
-#include "CoreIncludes.h"
 #include "LuaBind.h"
 #include "Namespace.h"
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "Core.h"
+#include "XMLFile.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/Loader.h
===================================================================
--- /code/branches/pch/src/core/Loader.h	(revision 3153)
+++ /code/branches/pch/src/core/Loader.h	(revision 3154)
@@ -33,5 +33,4 @@
 
 #include <vector>
-
 #include "ClassTreeMask.h"
 
Index: /code/branches/pch/src/core/LuaBind.cc
===================================================================
--- /code/branches/pch/src/core/LuaBind.cc	(revision 3153)
+++ /code/branches/pch/src/core/LuaBind.cc	(revision 3154)
@@ -31,7 +31,5 @@
 #include <fstream>
 #include <map>
-
 extern "C" {
-#include <lua.h>
 #include <lualib.h>
 }
@@ -39,6 +37,6 @@
 #include <boost/filesystem.hpp>
 
+#include "util/Debug.h"
 #include "util/String.h"
-#include "util/Debug.h"
 #include "ToluaBindCore.h"
 #include "Core.h"
@@ -72,5 +70,5 @@
   }
 
-  void LuaBind::luaPrint(std::string str)
+  void LuaBind::luaPrint(const std::string& str)
   {
     output_ += str;
@@ -84,5 +82,5 @@
       @param luaTags if true, the loaded file gets stripped off luaTags
   */
-  void LuaBind::loadFile(std::string filename, bool luaTags)
+  void LuaBind::loadFile(const std::string& filename, bool luaTags)
   {
     boost::filesystem::path filepath(filename);
@@ -117,5 +115,5 @@
   }
 
-  void LuaBind::loadString(std::string code)
+  void LuaBind::loadString(const std::string& code)
   {
     luaSource_ = code;
Index: /code/branches/pch/src/core/LuaBind.h
===================================================================
--- /code/branches/pch/src/core/LuaBind.h	(revision 3153)
+++ /code/branches/pch/src/core/LuaBind.h	(revision 3154)
@@ -38,11 +38,9 @@
 #include "CorePrereqs.h"
 
+#include <cassert>
+#include <string>
 extern "C" {
 #include <lua.h>
 }
-
-#include <cassert>
-#include <list>
-#include <string>
 
 // tolua_begin
@@ -64,10 +62,10 @@
       inline static LuaBind& getInstance() { assert(singletonRef_s); return *LuaBind::singletonRef_s; } // tolua_export
 
-    void loadFile(std::string filename, bool luaTags);
-    void loadString(std::string code);
+    void loadFile(const std::string& filename, bool luaTags);
+    void loadString(const std::string& code);
     //void init(lua_State *state_);
     //void xmlToLua();
     void run();
-    void luaPrint(std::string str); // tolua_export
+    void luaPrint(const std::string& str); // tolua_export
 
 #if LUA_VERSION_NUM != 501
@@ -76,5 +74,5 @@
 
     inline lua_State* getLuaState() { return luaState_; };
-    inline std::string getLuaOutput() { return output_; };
+    inline const std::string& getLuaOutput() { return output_; };
     //inline std::string* getFileString() { return &fileString_; };
     inline void clearLuaOutput() { output_ = ""; }
Index: /code/branches/pch/src/core/MetaObjectList.cc
===================================================================
--- /code/branches/pch/src/core/MetaObjectList.cc	(revision 3153)
+++ /code/branches/pch/src/core/MetaObjectList.cc	(revision 3154)
@@ -33,7 +33,8 @@
 
 #include "MetaObjectList.h"
+
+#include "util/Debug.h"
+#include "Identifier.h"
 #include "ObjectListBase.h"
-#include "Identifier.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/Namespace.cc
===================================================================
--- /code/branches/pch/src/core/Namespace.cc	(revision 3153)
+++ /code/branches/pch/src/core/Namespace.cc	(revision 3154)
@@ -28,4 +28,7 @@
 
 #include "Namespace.h"
+
+#include <set>
+
 #include "NamespaceNode.h"
 #include "CoreIncludes.h"
Index: /code/branches/pch/src/core/Namespace.h
===================================================================
--- /code/branches/pch/src/core/Namespace.h	(revision 3153)
+++ /code/branches/pch/src/core/Namespace.h	(revision 3154)
@@ -32,6 +32,6 @@
 #include "CorePrereqs.h"
 
-#include <map>
-
+#include <set>
+#include <string>
 #include "XMLIncludes.h"
 #include "BaseObject.h"
Index: /code/branches/pch/src/core/ObjectListBase.cc
===================================================================
--- /code/branches/pch/src/core/ObjectListBase.cc	(revision 3153)
+++ /code/branches/pch/src/core/ObjectListBase.cc	(revision 3154)
@@ -35,11 +35,10 @@
 */
 
+#include "ObjectListBase.h"
+
 #include <set>
-
-#include "CorePrereqs.h"
-
-#include "ObjectListBase.h"
 #include "Identifier.h"
 #include "Iterator.h"
+#include "ObjectListIterator.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/ObjectListBase.h
===================================================================
--- /code/branches/pch/src/core/ObjectListBase.h	(revision 3153)
+++ /code/branches/pch/src/core/ObjectListBase.h	(revision 3154)
@@ -38,7 +38,8 @@
 #define _ObjectListBase_H__
 
+#include "CorePrereqs.h"
+
 #include <vector>
-
-#include "CorePrereqs.h"
+#include "OrxonoxClass.h"
 
 namespace orxonox
@@ -139,7 +140,7 @@
 
         private:
-            Identifier* identifier_;               //!< The Iterator owning this list
-            ObjectListBaseElement* first_;         //!< The first element in the list
-            ObjectListBaseElement* last_;          //!< The last element in the list
+            Identifier* identifier_;                 //!< The Iterator owning this list
+            ObjectListBaseElement* first_;           //!< The first element in the list
+            ObjectListBaseElement* last_;            //!< The last element in the list
             std::vector<void*> iterators_;           //!< A list of Iterators pointing on an element in this list
             std::vector<void*> objectListIterators_; //!< A list of ObjectListIterators pointing on an element in this list
Index: /code/branches/pch/src/core/ObjectListIterator.h
===================================================================
--- /code/branches/pch/src/core/ObjectListIterator.h	(revision 3153)
+++ /code/branches/pch/src/core/ObjectListIterator.h	(revision 3154)
@@ -28,5 +28,5 @@
 
 /**
-    @file Iterator.h
+    @file
     @brief Definition and implementation of the Iterator class.
 
@@ -47,5 +47,6 @@
 
 #include "CorePrereqs.h"
-#include "ObjectListBase.h"
+#include "Identifier.h"
+#include "ObjectList.h"
 
 namespace orxonox
@@ -230,6 +231,3 @@
 }
 
-// Include ObjectList.h so the user only has to include one file: Iterator.h
-#include "ObjectList.h"
-
 #endif /* _ObjectListIterator_H__ */
Index: /code/branches/pch/src/core/OrxonoxClass.cc
===================================================================
--- /code/branches/pch/src/core/OrxonoxClass.cc	(revision 3153)
+++ /code/branches/pch/src/core/OrxonoxClass.cc	(revision 3154)
@@ -33,4 +33,5 @@
 
 #include "OrxonoxClass.h"
+
 #include "MetaObjectList.h"
 #include "Identifier.h"
Index: /code/branches/pch/src/core/OrxonoxClass.h
===================================================================
--- /code/branches/pch/src/core/OrxonoxClass.h	(revision 3153)
+++ /code/branches/pch/src/core/OrxonoxClass.h	(revision 3154)
@@ -39,7 +39,5 @@
 
 #include "CorePrereqs.h"
-
 #include <set>
-#include <string>
 
 namespace orxonox
Index: /code/branches/pch/src/core/Shell.cc
===================================================================
--- /code/branches/pch/src/core/Shell.cc	(revision 3153)
+++ /code/branches/pch/src/core/Shell.cc	(revision 3154)
@@ -28,4 +28,6 @@
 
 #include "Shell.h"
+
+#include "util/OutputHandler.h"
 #include "CommandExecutor.h"
 #include "CoreIncludes.h"
@@ -33,5 +35,4 @@
 #include "Core.h"
 #include "ConsoleCommand.h"
-#include "util/OutputHandler.h"
 
 #define SHELL_UPDATE_LISTENERS(function) \
Index: /code/branches/pch/src/core/Shell.h
===================================================================
--- /code/branches/pch/src/core/Shell.h	(revision 3153)
+++ /code/branches/pch/src/core/Shell.h	(revision 3154)
@@ -32,5 +32,7 @@
 #include "CorePrereqs.h"
 
+#include <cassert>
 #include <list>
+#include <string>
 #include <vector>
 
Index: /code/branches/pch/src/core/Super.h
===================================================================
--- /code/branches/pch/src/core/Super.h	(revision 3153)
+++ /code/branches/pch/src/core/Super.h	(revision 3154)
@@ -66,6 +66,4 @@
 #ifndef _Super_H__
 #define _Super_H__
-
-#include <iostream>
 
 #include "CorePrereqs.h"
Index: /code/branches/pch/src/core/TclBind.cc
===================================================================
--- /code/branches/pch/src/core/TclBind.cc	(revision 3153)
+++ /code/branches/pch/src/core/TclBind.cc	(revision 3154)
@@ -29,11 +29,13 @@
 #include "TclBind.h"
 
-#include <iostream>
+#include <exception>
 #include <string>
-#include "ConsoleCommand.h"
-#include "CommandExecutor.h"
-#include "TclThreadManager.h"
+#include <cpptcl/cpptcl.h>
+
 #include "util/Debug.h"
 #include "util/String.h"
+#include "CommandExecutor.h"
+#include "ConsoleCommand.h"
+#include "TclThreadManager.h"
 
 namespace orxonox
Index: /code/branches/pch/src/core/TclBind.h
===================================================================
--- /code/branches/pch/src/core/TclBind.h	(revision 3153)
+++ /code/branches/pch/src/core/TclBind.h	(revision 3154)
@@ -32,5 +32,6 @@
 #include "CorePrereqs.h"
 
-#include <cpptcl/cpptcl.h>
+#include <cassert>
+#include <string>
 
 namespace orxonox
Index: /code/branches/pch/src/core/TclThreadManager.cc
===================================================================
--- /code/branches/pch/src/core/TclThreadManager.cc	(revision 3153)
+++ /code/branches/pch/src/core/TclThreadManager.cc	(revision 3154)
@@ -29,18 +29,15 @@
 #include "TclThreadManager.h"
 
-#include <iostream>
-#include <string>
-#include <boost/thread/thread.hpp>
 #include <boost/bind.hpp>
 #include <OgreTimer.h>
-
+#include <cpptcl/cpptcl.h>
+
+#include "util/Convert.h"
+#include "util/Debug.h"
 #include "Clock.h"
+#include "CommandExecutor.h"
+#include "ConsoleCommand.h"
 #include "CoreIncludes.h"
-#include "ConsoleCommand.h"
-#include "CommandExecutor.h"
 #include "TclBind.h"
-#include "util/Debug.h"
-#include "util/Convert.h"
-
 
 namespace orxonox
Index: /code/branches/pch/src/core/TclThreadManager.h
===================================================================
--- /code/branches/pch/src/core/TclThreadManager.h	(revision 3153)
+++ /code/branches/pch/src/core/TclThreadManager.h	(revision 3154)
@@ -32,13 +32,11 @@
 #include "CorePrereqs.h"
 
-#include <queue>
+#include <list>
 #include <map>
-#include <list>
-
+#include <string>
+#include <boost/thread/condition.hpp>
 #include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
 #include <boost/thread/thread.hpp>
 
-#include <cpptcl/cpptcl.h>
 #include "core/OrxonoxClass.h"
 
Index: /code/branches/pch/src/core/Template.cc
===================================================================
--- /code/branches/pch/src/core/Template.cc	(revision 3153)
+++ /code/branches/pch/src/core/Template.cc	(revision 3154)
@@ -29,9 +29,10 @@
 #include "Template.h"
 
+#include <tinyxml/tinyxml.h>
 #include <tinyxml/ticpp.h>
 
+#include "util/Debug.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Debug.h"
 
 namespace orxonox
@@ -39,8 +40,9 @@
     CreateFactory(Template);
 
-    Template::Template(BaseObject* creator) : BaseObject(creator), xmlelement_("")
+    Template::Template(BaseObject* creator) : BaseObject(creator)
     {
         RegisterObject(Template);
 
+        this->xmlelement_ = new TiXmlElement("");
         this->bIsLink_ = false;
         this->bLoadDefaults_ = true;
@@ -52,4 +54,5 @@
     {
         Template::getTemplateMap().erase(this->getName());
+        delete this->xmlelement_;
     }
 
@@ -90,4 +93,9 @@
     }
 
+    void Template::setXMLElement(const TiXmlElement& xmlelement)
+    {
+        *this->xmlelement_ = xmlelement;
+    }
+
     const TiXmlElement& Template::getXMLElement() const
     {
@@ -115,5 +123,5 @@
         }
 
-        return this->xmlelement_;
+        return *this->xmlelement_;
     }
 
Index: /code/branches/pch/src/core/Template.h
===================================================================
--- /code/branches/pch/src/core/Template.h	(revision 3153)
+++ /code/branches/pch/src/core/Template.h	(revision 3154)
@@ -30,9 +30,8 @@
 #define _Template_H__
 
-#include <map>
-
 #include "CorePrereqs.h"
 
-#include <tinyxml/tinyxml.h>
+#include <map>
+#include <string>
 #include "BaseObject.h"
 
@@ -58,6 +57,5 @@
                 { return this->bLoadDefaults_; }
 
-            inline void setXMLElement(const TiXmlElement& xmlelement)
-                { this->xmlelement_ = xmlelement; }
+            void setXMLElement(const TiXmlElement& xmlelement);
             const TiXmlElement& getXMLElement() const;
 
@@ -75,5 +73,5 @@
 
         private:
-            TiXmlElement xmlelement_;
+            TiXmlElement* xmlelement_;
             std::string link_;
             std::string baseclass_;
Index: /code/branches/pch/src/core/XMLFile.h
===================================================================
--- /code/branches/pch/src/core/XMLFile.h	(revision 3153)
+++ /code/branches/pch/src/core/XMLFile.h	(revision 3154)
@@ -33,5 +33,4 @@
 
 #include <string>
-
 #include "ClassTreeMask.h"
 
Index: /code/branches/pch/src/core/XMLPort.cc
===================================================================
--- /code/branches/pch/src/core/XMLPort.cc	(revision 3153)
+++ /code/branches/pch/src/core/XMLPort.cc	(revision 3154)
@@ -28,8 +28,7 @@
 
 #include "XMLPort.h"
-#include "Language.h"
+
 #include "Loader.h"
 #include "Namespace.h"
-#include "CoreIncludes.h"
 
 namespace orxonox
@@ -40,5 +39,5 @@
     bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
     {
-        return ((!this->bApplyLoaderMask_) || identifier->isA(Class(Namespace)) || Loader::currentMask_s.isIncluded(identifier));
+        return ((!this->bApplyLoaderMask_) || identifier->isA(ClassIdentifier<Namespace>::getIdentifier()) || Loader::currentMask_s.isIncluded(identifier));
     }
 }
Index: /code/branches/pch/src/core/XMLPort.h
===================================================================
--- /code/branches/pch/src/core/XMLPort.h	(revision 3153)
+++ /code/branches/pch/src/core/XMLPort.h	(revision 3154)
@@ -44,13 +44,15 @@
 
 #include <cassert>
+#include <string>
 #include <tinyxml/ticpp.h>
+
 #include "util/Debug.h"
 #include "util/Exception.h"
+#include "util/MultiType.h"
 #include "util/OrxAssert.h"
-#include "util/MultiType.h"
+#include "Identifier.h"
+#include "Executor.h"
+#include "BaseObject.h"
 #include "XMLIncludes.h"
-#include "Executor.h"
-#include "CoreIncludes.h"
-#include "BaseObject.h"
 
 // ------------
@@ -177,5 +179,5 @@
 */
 #define XMLPortParamGeneric(containername, classname, objectclass, object, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
-    orxonox::XMLPortClassParamContainer<objectclass>* containername = (orxonox::XMLPortClassParamContainer<objectclass>*)(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
+    orxonox::XMLPortClassParamContainer<objectclass>* containername = static_cast<orxonox::XMLPortClassParamContainer<objectclass>*>(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
     if (!containername) \
     { \
@@ -546,8 +548,8 @@
                             for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
                             {
-                                Identifier* identifier = ClassByString(child->Value());
+                                Identifier* identifier = Factory::getIdentifier(child->Value());
                                 if (identifier)
                                 {
-                                    if (identifier->isA(Class(O)))
+                                    if (identifier->isA(ClassIdentifier<O>::getIdentifier()))
                                     {
                                         if (identifier->isLoadable())
@@ -607,5 +609,5 @@
                                     else
                                     {
-                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
+                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << ClassIdentifier<O>::getIdentifier()->getName() << "'." << std::endl;
                                     }
                                 }
@@ -627,5 +629,5 @@
                     {
                         COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << ClassIdentifier<O>::getIdentifier()->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
Index: /code/branches/pch/src/core/input/InputManager.cc
===================================================================
--- /code/branches/pch/src/core/input/InputManager.cc	(revision 3153)
+++ /code/branches/pch/src/core/input/InputManager.cc	(revision 3154)
@@ -41,4 +41,5 @@
 #include <ois/OISInputManager.h>
 
+#include "util/Convert.h"
 #include "util/Exception.h"
 #include "util/Debug.h"
@@ -48,4 +49,5 @@
 #include "core/ConsoleCommand.h"
 #include "core/CommandLine.h"
+#include "core/ObjectList.h"
 
 #include "InputBuffer.h"
Index: /code/branches/pch/src/network/GamestateClient.cc
===================================================================
--- /code/branches/pch/src/network/GamestateClient.cc	(revision 3153)
+++ /code/branches/pch/src/network/GamestateClient.cc	(revision 3154)
@@ -34,5 +34,5 @@
 #include "core/CoreIncludes.h"
 #include "core/BaseObject.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "synchronisable/Synchronisable.h"
 #include "synchronisable/NetworkCallbackManager.h"
Index: /code/branches/pch/src/network/NetworkFunction.h
===================================================================
--- /code/branches/pch/src/network/NetworkFunction.h	(revision 3153)
+++ /code/branches/pch/src/network/NetworkFunction.h	(revision 3154)
@@ -37,4 +37,5 @@
 #include <cassert>
 #include "util/MultiType.h"
+#include "core/Functor.h"
 #include "synchronisable/Synchronisable.h"
 #include "OrxonoxConfig.h"
Index: /code/branches/pch/src/network/Server.cc
===================================================================
--- /code/branches/pch/src/network/Server.cc	(revision 3153)
+++ /code/branches/pch/src/network/Server.cc	(revision 3154)
@@ -54,5 +54,5 @@
 #include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "packet/Chat.h"
 #include "packet/Packet.h"
Index: /code/branches/pch/src/network/packet/Gamestate.cc
===================================================================
--- /code/branches/pch/src/network/packet/Gamestate.cc	(revision 3153)
+++ /code/branches/pch/src/network/packet/Gamestate.cc	(revision 3154)
@@ -36,5 +36,5 @@
 #include "core/GameMode.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 
 
Index: /code/branches/pch/src/orxonox/CameraManager.cc
===================================================================
--- /code/branches/pch/src/orxonox/CameraManager.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/CameraManager.cc	(revision 3154)
@@ -34,5 +34,5 @@
 #include "util/String.h"
 #include "core/GameMode.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "tools/Shader.h"
 #include "objects/worldentities/Camera.h"
Index: /code/branches/pch/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- /code/branches/pch/src/orxonox/gamestates/GSLevel.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/gamestates/GSLevel.cc	(revision 3154)
@@ -148,12 +148,12 @@
         if (show)
         {
-            GUIManager::getInstancePtr()->showGUI("inGameTest");
-            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            GUIManager::getInstance().showGUI("inGameTest");
+            GUIManager::getInstance().executeCode("showCursor()");
             InputManager::getInstance().requestEnterState("guiMouseOnly");
         }
         else
         {
-            GUIManager::getInstancePtr()->executeCode("hideGUI(\"inGameTest\")");
-            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
             InputManager::getInstance().requestLeaveState("guiMouseOnly");
         }
Index: /code/branches/pch/src/orxonox/objects/Radar.cc
===================================================================
--- /code/branches/pch/src/orxonox/objects/Radar.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/objects/Radar.cc	(revision 3154)
@@ -37,5 +37,5 @@
 #include "core/CoreIncludes.h"
 #include "core/ConsoleCommand.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "RadarListener.h"
 
Index: /code/branches/pch/src/orxonox/objects/Radar.h
===================================================================
--- /code/branches/pch/src/orxonox/objects/Radar.h	(revision 3153)
+++ /code/branches/pch/src/orxonox/objects/Radar.h	(revision 3154)
@@ -39,5 +39,5 @@
 #include <map>
 #include <string>
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "core/OrxonoxClass.h"
 #include "objects/Tickable.h"
Index: /code/branches/pch/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc
===================================================================
--- /code/branches/pch/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc	(revision 3154)
@@ -34,5 +34,5 @@
 #include "core/Executor.h"
 #include "core/ConfigValueIncludes.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "tools/ParticleInterface.h"
 
Index: /code/branches/pch/src/orxonox/objects/worldentities/Camera.cc
===================================================================
--- /code/branches/pch/src/orxonox/objects/worldentities/Camera.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/objects/worldentities/Camera.cc	(revision 3154)
@@ -37,4 +37,5 @@
 
 #include "util/Exception.h"
+#include "util/String.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: /code/branches/pch/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- /code/branches/pch/src/orxonox/overlays/OverlayGroup.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/overlays/OverlayGroup.cc	(revision 3154)
@@ -37,5 +37,5 @@
 #include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "core/XMLPort.h"
 #include "OrxonoxOverlay.h"
Index: /code/branches/pch/src/orxonox/overlays/map/Map.cc
===================================================================
--- /code/branches/pch/src/orxonox/overlays/map/Map.cc	(revision 3153)
+++ /code/branches/pch/src/orxonox/overlays/map/Map.cc	(revision 3154)
@@ -31,4 +31,5 @@
 #include <OgreBorderPanelOverlayElement.h>
 #include <OgreCamera.h>
+#include <OgreEntity.h>
 #include <OgreHardwarePixelBuffer.h>
 #include <OgreMaterialManager.h>
@@ -50,5 +51,5 @@
 #include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
@@ -265,5 +266,5 @@
     }
 
-    Ogre::MaterialPtr Map::createRenderCamera(Ogre::Camera * cam, std::string matName)
+    Ogre::MaterialPtr Map::createRenderCamera(Ogre::Camera * cam, const std::string& matName)
     {
         Ogre::TexturePtr rttTex = Ogre::TextureManager::getSingleton().createManual(matName+"_tex", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, 512, 512, 0, Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET);
Index: /code/branches/pch/src/orxonox/overlays/map/Map.h
===================================================================
--- /code/branches/pch/src/orxonox/overlays/map/Map.h	(revision 3153)
+++ /code/branches/pch/src/orxonox/overlays/map/Map.h	(revision 3154)
@@ -30,5 +30,4 @@
 #include "OrxonoxPrereqs.h"
 
-#include <string>
 #include <OgreMaterial.h>
 
@@ -50,5 +49,5 @@
         virtual void changedOwner();
 
-        static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, std::string matName);
+        static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, const std::string& matName);
 
         static void openMap();
