Index: branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.cc	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.cc	(revision 9854)
@@ -6,5 +6,5 @@
 
 
-ResourceMD2::ResourceMD2(const std::string& modelName, const std::string& skinName, float scale)
+ResourceMD2::ResourceMD2(const std::string& modelName, const std::string& skinName, float scale, const Resources::KeepLevel& keepLevel)
     : Resource(&ResourceMD2::type)
 {
@@ -22,10 +22,10 @@
     //std::string skinFileName = this->Resource::locateFile(skinName);
     this->MD2Model::load(modelFileName, skinName, scale);
-    this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), Resources::KeepLevel(0), this->MD2Model::dataPointer()));
+    this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), keepLevel, this->MD2Model::dataPointer()));
   }
 
 }
 
-ResourceMD2 ResourceMD2::createFromString(const std::string& loadString)
+ResourceMD2 ResourceMD2::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
 {
   SubString loadValues(loadString, ',');
@@ -40,5 +40,5 @@
     scale = MultiType(loadValues[2]).getFloat();
 
-  return ResourceMD2(modelName, skinName, scale);
+  return ResourceMD2(modelName, skinName, scale, keepLevel);
 }
 
Index: branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.h
===================================================================
--- branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.h	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.h	(revision 9854)
@@ -15,6 +15,9 @@
 {
 public:
-  ResourceMD2(const std::string& modelName, const std::string& skinName = "", float scale = 1.0f);
-  static ResourceMD2 createFromString(const std::string& loadString);
+  ResourceMD2(const std::string& modelName,
+	      const std::string& skinName = "",
+	      float scale = 1.0f,
+	      const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  static ResourceMD2 createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
   static std::string loadString(const std::string& modelName, const std::string& skinName = "", float scale = 1.0f);
 
Index: branches/new_class_id/src/lib/graphics/importer/resource_obj.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/importer/resource_obj.cc	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/importer/resource_obj.cc	(revision 9854)
@@ -6,5 +6,5 @@
 
 
-ResourceOBJ::ResourceOBJ(const std::string& imageName, float scaling)
+ResourceOBJ::ResourceOBJ(const std::string& imageName, float scaling, const Resources::KeepLevel& keepLevel)
     : Resource(&ResourceOBJ::type)
 {
@@ -21,9 +21,9 @@
     std::string fileName = this->Resource::locateFile(imageName);
     this->acquireData(OBJModel(fileName, scaling).dataPointer());
-    this->Resource::addResource(new ResourceOBJ::OBJResourcePointer(imageName + ',' + MultiType(scaling).getString(), Resources::KeepLevel(0), this->StaticModel::dataPointer()));
+    this->Resource::addResource(new ResourceOBJ::OBJResourcePointer(imageName + ',' + MultiType(scaling).getString(), keepLevel, this->StaticModel::dataPointer()));
   }
 }
 
-ResourceOBJ ResourceOBJ::createFromString(const std::string& loadString)
+ResourceOBJ ResourceOBJ::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
 {
   SubString loadValues(loadString, ',');
@@ -35,5 +35,5 @@
     scaling = (GLenum)MultiType(loadValues[2]).getFloat();
 
-  return ResourceOBJ(imageName, scaling);
+  return ResourceOBJ(imageName, scaling, keepLevel);
 }
 
Index: branches/new_class_id/src/lib/graphics/importer/resource_obj.h
===================================================================
--- branches/new_class_id/src/lib/graphics/importer/resource_obj.h	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/importer/resource_obj.h	(revision 9854)
@@ -14,6 +14,9 @@
 {
 public:
-  ResourceOBJ(const std::string& imageName, float scaling = 1.0f);
-  static ResourceOBJ createFromString(const std::string& loadString);
+  ResourceOBJ(const std::string& imageName,
+	      float scaling = 1.0f,
+	      const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  static ResourceOBJ createFromString(const std::string& loadString,
+				      const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
 
 private:
Index: branches/new_class_id/src/lib/graphics/importer/resource_texture.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/importer/resource_texture.cc	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/importer/resource_texture.cc	(revision 9854)
@@ -6,5 +6,5 @@
 
 
-ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target)
+ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target, const Resources::KeepLevel& keepLevel)
     : Resource(&ResourceTexture::type)
 {
@@ -21,9 +21,9 @@
     std::string fileName = this->Resource::locateFile(imageName);
     this->Texture::loadImage(fileName, target);
-    this->Resource::addResource(new ResourceTexture::TextureResourcePointer(imageName + ',' + MultiType((int)target).getString(), Resources::KeepLevel(0), this->Texture::dataPointer()));
+    this->Resource::addResource(new ResourceTexture::TextureResourcePointer(imageName + ',' + MultiType((int)target).getString(), keepLevel, this->Texture::dataPointer()));
   }
 }
 
-ResourceTexture ResourceTexture::createFromString(const std::string& loadString)
+ResourceTexture ResourceTexture::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
 {
   SubString loadValues(loadString, ',');
@@ -35,5 +35,5 @@
     target = (GLenum)MultiType(loadValues[2]).getInt();
 
-  return ResourceTexture(imageName, target);
+  return ResourceTexture(imageName, target, keepLevel);
 }
 
Index: branches/new_class_id/src/lib/graphics/importer/resource_texture.h
===================================================================
--- branches/new_class_id/src/lib/graphics/importer/resource_texture.h	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/importer/resource_texture.h	(revision 9854)
@@ -15,6 +15,9 @@
 {
 public:
-  ResourceTexture(const std::string& imageName, GLenum target = GL_TEXTURE_2D);
-  static ResourceTexture createFromString(const std::string& loadString);
+  ResourceTexture(const std::string& imageName,
+                  GLenum target = GL_TEXTURE_2D,
+		  const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  static ResourceTexture createFromString(const std::string& loadString,
+					  const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
 
 private:
Index: branches/new_class_id/src/lib/graphics/resource_shader.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/resource_shader.cc	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/resource_shader.cc	(revision 9854)
@@ -4,5 +4,5 @@
 #include "substring.h"
 
-ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName)
+ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName, const Resources::KeepLevel& keepLevel)
     : Resource(&ResourceShader::type)
 {
@@ -23,9 +23,9 @@
 
     this->Shader::load(vertexFileName, fragmentFileName);
-    this->Resource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer()));
+    this->Resource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, keepLevel, this->Shader::dataPointer()));
   }
 }
 
-ResourceShader ResourceShader::createFromString(const std::string& loadString)
+ResourceShader ResourceShader::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
 {
   std::string vertexShaderName;
@@ -38,5 +38,5 @@
     fragmentShaderName = shaderNames[1];
 
-  return ResourceShader(vertexShaderName, fragmentShaderName);
+  return ResourceShader(vertexShaderName, fragmentShaderName, keepLevel);
 }
 
Index: branches/new_class_id/src/lib/graphics/resource_shader.h
===================================================================
--- branches/new_class_id/src/lib/graphics/resource_shader.h	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/resource_shader.h	(revision 9854)
@@ -15,6 +15,9 @@
 {
 public:
-  ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName);
-  static ResourceShader createFromString(const std::string& loadString);
+  ResourceShader(const std::string& vertexShaderName,
+		 const std::string& fragmentShaderName,
+		 const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  static ResourceShader createFromString(const std::string& loadString,
+					 const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
 
 private:
Index: branches/new_class_id/src/lib/graphics/text_engine/resource_font.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/text_engine/resource_font.cc	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/text_engine/resource_font.cc	(revision 9854)
@@ -6,5 +6,5 @@
 
 
-ResourceFont::ResourceFont(const std::string& fontName, unsigned int renderSize)
+ResourceFont::ResourceFont(const std::string& fontName, unsigned int renderSize, const Resources::KeepLevel& keepLevel)
   : Font(), Resource(&ResourceFont::type)
 {
@@ -25,9 +25,9 @@
 
     this->Font::loadFontFromTTF(fileName, renderSize);
-    this->Resource::addResource(new ResourceFont::FontResourcePointer(fontName + ',' + MultiType((int)renderSize).getString(), Resources::KeepLevel(0), this->Font::dataPointer()));
+    this->Resource::addResource(new ResourceFont::FontResourcePointer(fontName + ',' + MultiType((int)renderSize).getString(), keepLevel, this->Font::dataPointer()));
   }
 }
 
-ResourceFont ResourceFont::createFromString(const std::string& loadString)
+ResourceFont ResourceFont::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
 {
   SubString loadValues(loadString, ',');
@@ -39,5 +39,5 @@
     renderSize = (unsigned int)MultiType(loadValues[2]).getInt();
 
-  return ResourceFont(fontName, renderSize);
+  return ResourceFont(fontName, renderSize, keepLevel);
 }
 
Index: branches/new_class_id/src/lib/graphics/text_engine/resource_font.h
===================================================================
--- branches/new_class_id/src/lib/graphics/text_engine/resource_font.h	(revision 9853)
+++ branches/new_class_id/src/lib/graphics/text_engine/resource_font.h	(revision 9854)
@@ -15,6 +15,6 @@
 {
 public:
-  ResourceFont(const std::string& fontName, unsigned int renderSize);
-  static ResourceFont createFromString(const std::string& loadString);
+  ResourceFont(const std::string& fontName, unsigned int renderSize, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  static ResourceFont createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
 
 private:
Index: branches/new_class_id/src/lib/shell/some_shell_commands.cc
===================================================================
--- branches/new_class_id/src/lib/shell/some_shell_commands.cc	(revision 9853)
+++ branches/new_class_id/src/lib/shell/some_shell_commands.cc	(revision 9854)
@@ -55,5 +55,5 @@
 namespace Resources {
   SHELL_COMMAND(debug, ResourceManager, debug);
-  SHELL_COMMAND(load, ResourceManager, loadFromLoadString);
+  SHELL_COMMAND(load, ResourceManager, loadFromLoadStringHACK);
   SHELL_COMMAND(unload, ResourceManager, unloadAllBelowKeepLevelINT);
 }
Index: branches/new_class_id/src/lib/sound/resource_sound_buffer.cc
===================================================================
--- branches/new_class_id/src/lib/sound/resource_sound_buffer.cc	(revision 9853)
+++ branches/new_class_id/src/lib/sound/resource_sound_buffer.cc	(revision 9854)
@@ -8,5 +8,5 @@
   ObjectListDefinition(ResourceSoundBuffer);
 
-  ResourceSoundBuffer::ResourceSoundBuffer(const std::string& soundName)
+  ResourceSoundBuffer::ResourceSoundBuffer(const std::string& soundName, const Resources::KeepLevel& keepLevel)
       : SoundBuffer(), Resource(&ResourceSoundBuffer::type)
   {
@@ -25,5 +25,5 @@
       std::string fileName = this->Resource::locateFile(soundName);
       this->SoundBuffer::load(fileName);
-      this->Resource::addResource(new ResourceSoundBuffer::SoundBufferResourcePointer(soundName, Resources::KeepLevel(0), this->SoundBuffer::dataPointer()));
+      this->Resource::addResource(new ResourceSoundBuffer::SoundBufferResourcePointer(soundName, keepLevel, this->SoundBuffer::dataPointer()));
     }
   }
Index: branches/new_class_id/src/lib/sound/resource_sound_buffer.h
===================================================================
--- branches/new_class_id/src/lib/sound/resource_sound_buffer.h	(revision 9853)
+++ branches/new_class_id/src/lib/sound/resource_sound_buffer.h	(revision 9854)
@@ -17,6 +17,8 @@
     ObjectListDeclaration(ResourceSoundBuffer);
   public:
-    ResourceSoundBuffer(const std::string& soundName);
-    static ResourceSoundBuffer createFromString(const std::string& loadString) { return ResourceSoundBuffer(loadString); };
+    ResourceSoundBuffer(const std::string& soundName,
+			const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+    static ResourceSoundBuffer createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel())
+    { return ResourceSoundBuffer(loadString, keepLevel); };
 
   private:
Index: branches/new_class_id/src/lib/util/loading/resource.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource.cc	(revision 9853)
+++ branches/new_class_id/src/lib/util/loading/resource.cc	(revision 9854)
@@ -134,4 +134,18 @@
   //// KEEPLEVEL ////
   ///////////////////
+
+  //! Constructs a default KeepLevel as Set in the ResourceManager via setDefaultKeepLevel.
+  KeepLevel::KeepLevel()
+  {
+    this->_keepLevel = ResourceManager::getInstance()->defaultKeepLevel().keepLevel();
+  }
+  /**
+   * @param keepLevel the level to set.
+   */
+  KeepLevel::KeepLevel(unsigned int keepLevel)
+  {
+    _keepLevel = keepLevel;
+  }
+
   /**
    * @brief constructor of a KeepLevel.
Index: branches/new_class_id/src/lib/util/loading/resource.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource.h	(revision 9853)
+++ branches/new_class_id/src/lib/util/loading/resource.h	(revision 9854)
@@ -26,6 +26,6 @@
   {
   public:
-    /** @param keepLevel the level to set. */
-    inline KeepLevel(unsigned int keepLevel) { _keepLevel = keepLevel; };
+    KeepLevel();
+    KeepLevel(unsigned int keepLevel);
     KeepLevel(const std::string& keepLevelName);
 
@@ -93,6 +93,10 @@
     bool operator==(const std::string& typeName) const { return this->_typeName == typeName; };
 
+    ////////////////////
+    //// EXTENSIONS ////
     void addExtension(const std::string& extension);
 
+    ///////////////
+    //// PATHS ////
     bool addResourcePath(const std::string& path);
     bool addResourceSubPath(const std::string& subPath);
@@ -109,10 +113,15 @@
     const std::vector<Resources::StorePointer*>& storedResources() const { return _storedResources; };
 
-    virtual void createFromString(const std::string& loadString) = 0;
-
+    ///////////////////////////////
+    //// LOADING AND UNLOADING ////
+    virtual void createFromString(const std::string& loadString, const KeepLevel& keepLevel = KeepLevel()) = 0;
     void unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel);
 
+    ///////////////////
+    //// INTERNALS ////
     void addResource(Resources::StorePointer* resource);
 
+    ///////////////
+    //// DEBUG ////
     void debug() const;
 
@@ -144,5 +153,5 @@
     tType(const std::string& typeName) : Type(typeName) {};
     /** @param loadString the String to load a Resource with @brief tries to create a Resource of Type T with a loadString */
-    virtual void createFromString(const std::string& loadString) { T::createFromString(loadString); }
+    virtual void createFromString(const std::string& loadString, const KeepLevel& keepLevel = KeepLevel()) { T::createFromString(loadString, keepLevel); }
   };
 
Index: branches/new_class_id/src/lib/util/loading/resource_manager.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9853)
+++ branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9854)
@@ -35,4 +35,5 @@
   */
   ResourceManager::ResourceManager ()
+  : _defaultKeepLevel(0)
   {
     this->registerObject(this, ResourceManager::_objectList);
@@ -47,10 +48,4 @@
   ResourceManager::~ResourceManager ()
   {
-    // deleting the Resources-List
-    //this->unloadAllByPriority(RP_GAME);
-
-    //   if (!this->resourceList.empty())
-    //     PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());
-
     ResourceManager::_singletonRef = NULL;
   }
@@ -195,5 +190,5 @@
    * @param loadString the loadString to load in the Type.
    */
-  void ResourceManager::loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString)
+  void ResourceManager::loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString, const KeepLevel& keepLevel)
   {
     std::vector<Resources::Type*>::const_iterator it;
@@ -202,5 +197,5 @@
       if (*(*it) == resourceTypeName)
       {
-	(*it)->createFromString(loadString);
+	(*it)->createFromString(loadString, keepLevel);
 	/// TODO check if the resource was allocated!!
 	return ;
Index: branches/new_class_id/src/lib/util/loading/resource_manager.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource_manager.h	(revision 9853)
+++ branches/new_class_id/src/lib/util/loading/resource_manager.h	(revision 9854)
@@ -17,4 +17,6 @@
     ObjectListDeclaration(ResourceManager);
   public:
+    ///////////////////////
+    //// INSTANZIATION ////
     /** @returns a Pointer to the only object of this Class */
     inline static ResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new ResourceManager();  return _singletonRef; };
@@ -22,5 +24,6 @@
     inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; };
 
-
+    ////////////////////////
+    //// RESOURCE PATHS ////
     void setMainGlobalPath(const Directory& directory);
     void addGlobalPath(const Directory& directory);
@@ -31,10 +34,4 @@
     void unregisterType(Resources::Type* type);
 
-    unsigned int addKeepLevelName(const std::string& keepLevelName);
-    unsigned int getKeepLevelID(const std::string& keepLevelName) const;
-    const std::string& getKeepLevelName(unsigned int keepLevelID) const;
-
-    /** @returns the Types of Resources */
-    const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
     /** @returns the main global search Path */
     const Directory& mainGlobalPath() const { return _mainGlobalPath; };
@@ -42,17 +39,32 @@
     const std::vector<Directory>& globalPaths() const { return _globalPaths; };
 
+    ////////////////////
+    //// KEEPLEVELS ////
+    unsigned int addKeepLevelName(const std::string& keepLevelName);
+    unsigned int getKeepLevelID(const std::string& keepLevelName) const;
+    const std::string& getKeepLevelName(unsigned int keepLevelID) const;
+    void setDefaultKeepLevel(const KeepLevel& keepLevel) { this->_defaultKeepLevel = keepLevel; };
+    const KeepLevel& defaultKeepLevel() const { return this->_defaultKeepLevel; };
+
+    //////////////////////////
+    //// GENERAL QUERIES ////
+    /** @returns the Types of Resources */
+    const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
 
     bool checkFileInMainPath(const File& fileInside);
     std::string prependAbsoluteMainPath(const std::string& fileName);
 
+    ////////////////////////////////////////
+    //// RESOURCE LOADING AND UNLOADING ////
+    void loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString, const KeepLevel& keepLevel = KeepLevel());
+    void loadFromLoadStringHACK(const std::string& resourceTypeName, const std::string& loadString) { this->loadFromLoadString(resourceTypeName, loadString); };
+
     void unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel);
     void unloadAllBelowKeepLevelINT(unsigned int level) { unloadAllBelowKeepLevel(level); };
-    void loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString);
 
+    ///////////////
+    //// DEBUG ////
     void debug() const;
 
-    // utility functions for handling files in and around the data-directory
-    static std::string getFullName(const std::string& fileName);
-    static bool isInDataDir(const std::string& fileName);
   private:
     ResourceManager();
@@ -66,5 +78,7 @@
 
     std::vector<Resources::Type*>      _resourceTypes;      //!< A Vector of all the stored ResourceTypes @see Resources::Type
+
     std::vector<std::string>           _keepLevelNames;     //!< Names of KeepLevels @see Resources::KeepLevel
+    KeepLevel                          _defaultKeepLevel;   //!< The default KeepLevel.
   };
 
Index: branches/new_class_id/src/orxonox.cc
===================================================================
--- branches/new_class_id/src/orxonox.cc	(revision 9853)
+++ branches/new_class_id/src/orxonox.cc	(revision 9854)
@@ -377,6 +377,6 @@
   Resources::ResourceManager::getInstance()->addKeepLevelName("CampaignEnd");
   Resources::ResourceManager::getInstance()->addKeepLevelName("GameEnd");
-
-  //  DynamicLoader::loadDyLib("libtest.so");
+  Resources::ResourceManager::getInstance()->setDefaultKeepLevel(std::string("GameEnd"));
+
   return 0;
 }
