Index: trunk/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.cc	(revision 7199)
+++ trunk/src/lib/graphics/effects/fog_effect.cc	(revision 7221)
@@ -126,11 +126,11 @@
  * @param mode the mode character
  */
-GLint FogEffect::charToFogMode(const char* mode)
+GLint FogEffect::stringToFogMode(const std::string& mode)
 {
-  if( !strcmp( "GL_LINEAR", mode))
+  if(mode == "GL_LINEAR")
     return GL_LINEAR;
-  else if( !strcmp("GL_EXP", mode))
+  else if(mode == "GL_EXP")
     return GL_EXP;
-  else if(!strcmp("GL_EXP2", mode) )
+  else if(mode == "GL_EXP2" )
     return GL_EXP2;
   else
Index: trunk/src/lib/graphics/effects/fog_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.h	(revision 7199)
+++ trunk/src/lib/graphics/effects/fog_effect.h	(revision 7221)
@@ -26,5 +26,5 @@
     virtual bool deactivate();
 
-    inline void setFogMode(const char* mode) { this->fogMode = this->charToFogMode(mode); }
+    inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); }
     inline void setFogDensity(float density) { this->fogDensity = density; }
     inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; }
@@ -33,5 +33,5 @@
 
   private:
-    GLint charToFogMode(const char* mode);
+    GLint stringToFogMode(const std::string& mode);
 
 
Index: trunk/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.cc	(revision 7199)
+++ trunk/src/lib/graphics/effects/lense_flare.cc	(revision 7221)
@@ -131,5 +131,5 @@
  * @param mode the mode character
  */
-GLint LenseFlare::charToFogMode(const char* mode)
+GLint LenseFlare::stringToFogMode(const std::string& mode)
 {}
 
@@ -147,5 +147,5 @@
  *  7th: Texture of the third burst
  */
-void LenseFlare::addFlare(const char* textureName)
+void LenseFlare::addFlare(const std::string& textureName)
 {
   if( this->flares.size() > LF_MAX_FLARES)
@@ -159,5 +159,5 @@
   bb->setSize(50, 50);
   this->flares.push_back(bb);
-  PRINTF(0)("Added a Lenseflare Billboard with texture %s\n", textureName);
+  PRINTF(4)("Added a Lenseflare Billboard with texture %s\n", textureName.c_str());
 
   // the first flare belongs to the light source
@@ -167,5 +167,5 @@
     bb->setVisibility(true);
   }
-  PRINTF(0)("Finished adding\n", textureName);
+  PRINTF(4)("Finished adding\n");
 }
 
Index: trunk/src/lib/graphics/effects/lense_flare.h
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.h	(revision 7199)
+++ trunk/src/lib/graphics/effects/lense_flare.h	(revision 7221)
@@ -39,9 +39,9 @@
     virtual void tick(float dt);
 
-    void addFlare(const char* textureName);
+    void addFlare(const std::string& textureName);
 
 
   private:
-    GLint charToFogMode(const char* mode);
+    GLint stringToFogMode(const std::string& mode);
     void setSourceVisibility(bool visibility) ;
 
Index: trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- trunk/src/lib/graphics/graphics_engine.cc	(revision 7199)
+++ trunk/src/lib/graphics/graphics_engine.cc	(revision 7221)
@@ -78,11 +78,4 @@
   this->screen = NULL;
 
-
-  // Hardware
-  this->hwRenderer = NULL;
-  this->hwVendor = NULL;
-  this->hwVersion = NULL;
-  this->hwExtensions = NULL;
-
   // initialize the Modules
   TextEngine::getInstance();
@@ -103,9 +96,4 @@
   // delete what has to be deleted here
   this->displayFPS( false );
-
-  delete[] this->hwRenderer;
-  delete[] this->hwVendor;
-  delete[] this->hwVersion;
-  delete this->hwExtensions;
 
   //TextEngine
@@ -169,20 +157,20 @@
 {
   // looking if we are in fullscreen-mode
-  const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
-  if (strchr(fullscreen, '1') || !strcasecmp(fullscreen, "true"))
+  const std::string fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
+  if (fullscreen[0] == '1' || fullscreen == "true")
     this->fullscreenFlag = SDL_FULLSCREEN;
 
   // looking if we are in fullscreen-mode
-  const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
-  if (strchr(textures, '1') || !strcasecmp(textures, "true"))
-    Texture::setTextureEnableState( true);
+  const std::string textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
+  if (textures[0] == '1' || textures == "true")
+    Texture::setTextureEnableState(true);
   else
     Texture::setTextureEnableState(false);
 
   // searching for a usefull resolution
-  SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x');
+  SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480").c_str(), 'x'); ///FIXME
   //resolution.debug();
-
-  this->initVideo(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16);
+  MultiType x = resolution.getString(0), y = resolution.getString(1);
+  this->initVideo(x.getInt(), y.getInt(), 16);
 
   //   GraphicsEffect* fe = new FogEffect(NULL);
@@ -262,16 +250,16 @@
  * @param icon The name of the Icon on the Disc
  */
-void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
-{
-  SDL_Surface* iconSurf = SDL_LoadBMP(icon);
+void GraphicsEngine::setWindowName(const std::string& windowName, const std::string& icon)
+{
+  SDL_Surface* iconSurf = SDL_LoadBMP(icon.c_str());
   if (iconSurf != NULL)
   {
     Uint32 colorkey = SDL_MapRGB(iconSurf->format, 0, 0, 0);
     SDL_SetColorKey(iconSurf, SDL_SRCCOLORKEY, colorkey);
-    SDL_WM_SetIcon(iconSurf,NULL);
+    SDL_WM_SetIcon(iconSurf, NULL);
     SDL_FreeSurface(iconSurf);
   }
 
-  SDL_WM_SetCaption (windowName, icon);
+  SDL_WM_SetCaption (windowName.c_str(), icon.c_str());
 }
 
@@ -312,28 +300,24 @@
   //  printf("%s %s %s\n %s", renderer, vendor, version, extensions);
 
-  if (this->hwRenderer == NULL && renderer != NULL)
-  {
-    this->hwRenderer = new char[strlen(renderer)+1];
-    strcpy(this->hwRenderer, renderer);
-  }
-  if (this->hwVendor == NULL && vendor != NULL)
-  {
-    this->hwVendor = new char[strlen(vendor)+1];
-    strcpy(this->hwVendor, vendor);
-  }
-  if (this->hwVersion == NULL && version != NULL)
-  {
-    this->hwVersion = new char[strlen(version)+11];
-    strcpy(this->hwVersion, version);
-  }
-
-  if (this->hwExtensions == NULL && extensions != NULL)
-    this->hwExtensions = new SubString((char*)glGetString(GL_EXTENSIONS), " \n\t,");
+  if (renderer != NULL)
+  {
+    this->hwRenderer == renderer;
+  }
+  if (vendor != NULL)
+  {
+    this->hwVendor == vendor;
+  }
+  if (version != NULL)
+  {
+    this->hwVersion == version;
+  }
+
+  if (extensions != NULL)
+    this->hwExtensions.split(extensions, " \n\t,");
 
   PRINT(4)("Running on : vendor: %s,  renderer: %s,  version:%s\n", vendor, renderer, version);
   PRINT(4)("Extensions:\n");
-  if (this->hwExtensions != NULL)
-    for (unsigned int i = 0; i < this->hwExtensions->getCount(); i++)
-      PRINT(4)("%d: %s\n", i, this->hwExtensions->getString(i));
+  for (unsigned int i = 0; i < this->hwExtensions.getCount(); i++)
+    PRINT(4)("%d: %s\n", i, this->hwExtensions.getString(i).c_str());
 
 
@@ -529,10 +513,9 @@
  * @return true if it is, false otherwise
  */
-bool GraphicsEngine::hwSupportsEXT(const char* extension)
-{
-  if (this->hwExtensions != NULL)
-    for (unsigned int i = 0; i < this->hwExtensions->getCount(); i++)
-      if (!strcmp(extension, this->hwExtensions->getString(i)))
-        return true;
+bool GraphicsEngine::hwSupportsEXT(const std::string& extension)
+{
+  for (unsigned int i = 0; i < this->hwExtensions.getCount(); i++)
+    if ( this->hwExtensions.getString(i) == extension)
+      return true;
   return false;
 }
@@ -587,5 +570,5 @@
 void GraphicsEngine::draw() const
 {
-//  LightManager::getInstance()->draw();
+  //  LightManager::getInstance()->draw();
 
   GraphicsEngine::storeMatrices();
@@ -668,7 +651,7 @@
   switch (event.type)
   {
-      case EV_VIDEO_RESIZE:
-      this->resolutionChanged(event.resize);
-      break;
-  }
-}
+  case EV_VIDEO_RESIZE:
+    this->resolutionChanged(event.resize);
+    break;
+  }
+}
Index: trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- trunk/src/lib/graphics/graphics_engine.h	(revision 7199)
+++ trunk/src/lib/graphics/graphics_engine.h	(revision 7221)
@@ -14,11 +14,11 @@
 #include "sdlincl.h"
 #include "glincl.h"
+#include <list>
 
-#include <list>
+#include "substring.h"
 
 // Forward Declaration
 class Text;
 class IniParser;
-class SubString;
 class WorldEntity;
 class GraphicsEffect;
@@ -41,5 +41,5 @@
     int initFromIniFile(IniParser* iniParser);
 
-    void setWindowName(const char* windowName, const char* icon);
+    void setWindowName(const std::string& windowName, const std::string& icon);
 
     int setResolution(int width, int height, int bpp);
@@ -74,5 +74,5 @@
 
     void listModes();
-    bool hwSupportsEXT(const char* extension);
+    bool hwSupportsEXT(const std::string& extension);
 
     /** @brief swaps the GL_BUFFERS */
@@ -116,8 +116,8 @@
 
     // HARDWARE-Settings:
-    char*                      hwRenderer;         //!< HW-renderer-string
-    char*                      hwVendor;           //!< HW-vendor-string
-    char*                      hwVersion;          //!< HW-version-string
-    SubString*                 hwExtensions;       //!< All suported Extensions.
+    std::string                hwRenderer;         //!< HW-renderer-string
+    std::string                hwVendor;           //!< HW-vendor-string
+    std::string                hwVersion;          //!< HW-version-string
+    SubString                  hwExtensions;       //!< All suported Extensions.
 
     // FPS-related
Index: trunk/src/lib/graphics/importer/height_map.cc
===================================================================
--- trunk/src/lib/graphics/importer/height_map.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/height_map.cc	(revision 7221)
@@ -333,11 +333,12 @@
 }
 
-HeightMap::HeightMap(const char* height_map_name = NULL) : VertexArrayModel()
+HeightMap::HeightMap(const std::string& height_map_name = "")
+  : VertexArrayModel()
 {
    this->setClassID(CL_HEIGHT_MAP, "HeightMap");
-   heightMap =  IMG_Load(height_map_name);
+   heightMap =  IMG_Load(height_map_name.c_str());
    if(heightMap!=NULL) {
 
-                 PRINTF(0)("loading Image %s\n", height_map_name);
+     PRINTF(0)("loading Image %s\n", height_map_name.c_str());
                  PRINTF(0)("width : %i\n", heightMap->w);
                  PRINTF(0)("height : %i\n", heightMap->h);
@@ -350,5 +351,5 @@
                 }
 
-     else       PRINTF(4)("oops! couldn't load %s for some reason.\n", height_map_name);
+                else       PRINTF(4)("oops! couldn't load %s for some reason.\n", height_map_name.c_str());
 
 
@@ -361,12 +362,13 @@
 }
 
-HeightMap::HeightMap(const char* height_map_name = NULL, const char* colour_map_name = NULL) : VertexArrayModel()
+HeightMap::HeightMap(const std::string& height_map_name = NULL, const std::string& colour_map_name = NULL)
+  : VertexArrayModel()
 {
 this->setClassID(CL_HEIGHT_MAP, "HeightMap");
 
-   heightMap =  IMG_Load(height_map_name);
+   heightMap =  IMG_Load(height_map_name.c_str());
    if(heightMap!=NULL) {
 
-                 PRINTF(0)("loading Image %s\n", height_map_name);
+     PRINTF(0)("loading Image %s\n", height_map_name.c_str());
                  PRINTF(0)("width : %i\n", heightMap->w);
                  PRINTF(0)("height : %i\n", heightMap->h);
@@ -379,5 +381,5 @@
                 }
 
-     else       PRINTF(4)("oops! couldn't load %s for some reason.\n", height_map_name);
+                else       PRINTF(4)("oops! couldn't load %s for some reason.\n", height_map_name.c_str());
 
 
@@ -385,12 +387,12 @@
 
   colourMap=NULL;
-  if(colour_map_name != NULL)
+  if(colour_map_name != "")
   {
-  colourMap = IMG_Load(colour_map_name);
+    colourMap = IMG_Load(colour_map_name.c_str());
   }
 
   if(colourMap != NULL)
                 {
-                 PRINTF(0)("loading Image %s\n", colour_map_name);
+                  PRINTF(0)("loading Image %s\n", colour_map_name.c_str());
                  PRINTF(0)("width : %i\n", colourMap->w);
                  PRINTF(0)("height : %i\n", colourMap->h);
Index: trunk/src/lib/graphics/importer/height_map.h
===================================================================
--- trunk/src/lib/graphics/importer/height_map.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/height_map.h	(revision 7221)
@@ -59,5 +59,5 @@
 void load();
 void load(int Mode);
-void load(const char*, int Mode);
+void load(const std::string&, int Mode);
 void scale( Vector V);
 void setAbsCoor(Vector V);
@@ -65,6 +65,6 @@
 float getNormal(float x, float y);
 HeightMap();
-HeightMap(const char*);
-HeightMap(const char*, const char*);
+HeightMap(const std::string&);
+HeightMap(const std::string&, const std::string&);
 virtual ~HeightMap();
 
Index: trunk/src/lib/graphics/importer/material.cc
===================================================================
--- trunk/src/lib/graphics/importer/material.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/material.cc	(revision 7221)
@@ -34,5 +34,5 @@
  * @param mtlName Name of the Material to be added to the Material List
  */
-Material::Material (const char* mtlName)
+Material::Material (const std::string& mtlName)
 {
   this->setClassID(CL_MATERIAL, "Material");
@@ -278,5 +278,5 @@
  * @param pathName The Path to add.
 */
-void Material::addTexturePath(const char* pathName)
+void Material::addTexturePath(const std::string& pathName)
 {
   ResourceManager::getInstance()->addImageDir(pathName);
@@ -289,5 +289,5 @@
  * @param dMap the Name of the Image to Use
 */
-void Material::setDiffuseMap(const char* dMap, GLenum target)
+void Material::setDiffuseMap(const std::string& dMap, GLenum target)
 {
   PRINTF(5)("setting Diffuse Map %s\n", dMap);
@@ -297,5 +297,5 @@
   //! @todo check if RESOURCE MANAGER is availiable
   //! @todo Textures from .mtl-file need special care.
-  if (dMap != NULL)
+  if (!dMap.empty())
     this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target);
   else
@@ -308,5 +308,5 @@
    @todo implement this
 */
-void Material::setAmbientMap(const char* aMap, GLenum target)
+void Material::setAmbientMap(const std::string& aMap, GLenum target)
 {
   SDL_Surface* ambientMap;
@@ -319,5 +319,5 @@
    @todo implement this
 */
-void Material::setSpecularMap(const char* sMap, GLenum target)
+void Material::setSpecularMap(const std::string& sMap, GLenum target)
 {
   SDL_Surface* specularMap;
@@ -330,6 +330,6 @@
    @todo implemet this
 */
-void Material::setBump(const char* bump)
-{
-
-}
+void Material::setBump(const std::string& bump)
+{
+
+}
Index: trunk/src/lib/graphics/importer/material.h
===================================================================
--- trunk/src/lib/graphics/importer/material.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/material.h	(revision 7221)
@@ -26,5 +26,5 @@
 {
  public:
-  Material (const char* mtlName = NULL);
+  Material (const std::string& mtlName = "");
   virtual ~Material ();
 
@@ -49,11 +49,11 @@
 
  // MAPPING //
-  void setDiffuseMap(const char* dMap, GLenum target = GL_TEXTURE_2D);
-  void setAmbientMap(const char* aMap, GLenum target = GL_TEXTURE_2D);
-  void setSpecularMap(const char* sMap, GLenum target = GL_TEXTURE_2D);
-  void setBump(const char* bump);
+  void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D);
+  void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
+  void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
+  void setBump(const std::string& bump);
   GLuint getDiffuseTexture() const { return (this->diffuseTexture)? this->diffuseTexture->getTexture() : 0; };
 
-  static void addTexturePath(const char* pathName);
+  static void addTexturePath(const std::string& pathName);
 
   private:
Index: trunk/src/lib/graphics/importer/md2Model.cc
===================================================================
--- trunk/src/lib/graphics/importer/md2Model.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/md2Model.cc	(revision 7221)
@@ -75,9 +75,10 @@
   \brief simple constructor initializing all variables
 */
-MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale)
+MD2Model::MD2Model(const std::string& modelFileName, const std::string& skinFileName, float scale)
 {
   this->setClassID(CL_MD2_MODEL, "MD2Model");
   /* this creates the data container via ressource manager */
-  this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale);
+  if (!modelFileName.empty())
+    this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale);
   if( unlikely(this->data == NULL))
     PRINTF(0)("The model was not found, MD2Model Loader finished abnormaly. Update the data-repos\n");
@@ -352,6 +353,6 @@
 {
   PRINT(0)("\n==========================| MD2Model::debug() |===\n");
-  PRINT(0)("=  Model FileName:\t%s\n", this->data->fileName);
-  PRINT(0)("=  Skin FileName:\t%s\n", this->data->skinFileName);
+  PRINT(0)("=  Model FileName:\t%s\n", this->data->fileName.c_str());
+  PRINT(0)("=  Skin FileName:\t%s\n", this->data->skinFileName.c_str());
   PRINT(0)("=  Size in Memory:\t%i Bytes\n", this->data->header->frameSize * this->data->header->numFrames + 64); // 64bytes is the header size
   PRINT(0)("=  Number of Vertices:\t%i\n", this->data->header->numVertices);
@@ -370,5 +371,5 @@
   \brief simple constructor
 */
-MD2Data::MD2Data(const char* modelFileName, const char* skinFileName, float scale)
+MD2Data::MD2Data(const std::string& modelFileName, const std::string& skinFileName, float scale)
 {
   scale *= 0.1f;
@@ -387,6 +388,6 @@
   this->scaleFactor = scale;
 
-  this->fileName = NULL;
-  this->skinFileName = NULL;
+  this->fileName = "";
+  this->skinFileName = "";
   this->loadModel(modelFileName);
   this->loadSkin(skinFileName);
@@ -401,6 +402,4 @@
 MD2Data::~MD2Data()
 {
-  delete [] this->fileName;
-  delete [] this->skinFileName;
   delete this->header;
 
@@ -419,5 +418,5 @@
   \return true if success
 */
-bool MD2Data::loadModel(const char* fileName)
+bool MD2Data::loadModel(const std::string& fileName)
 {
   FILE *pFile;                            //file stream
@@ -428,8 +427,8 @@
 
   //! @todo this chek should include deleting a loaded model (eventually)
-  if (fileName == NULL)
+  if (fileName.empty())
     return false;
 
-  pFile = fopen(fileName, "rb");
+  pFile = fopen(fileName.c_str(), "rb");
   if( unlikely(!pFile))
     {
@@ -442,10 +441,9 @@
   if( unlikely(this->header->version != MD2_VERSION) && unlikely(this->header->ident != MD2_IDENT))
     {
-      PRINTF(1)("Couldn't load file %s: invalid file format: stop loading\n", fileName);
+      PRINTF(1)("Couldn't load file %s: invalid file format: stop loading\n", fileName.c_str());
       return false;
     }
 
-  this->fileName = new char[strlen(fileName)+1];
-  strcpy(this->fileName, fileName);
+  this->fileName =fileName;
   /* got the data: map it to locals */
   this->numFrames = this->header->numFrames;
@@ -507,14 +505,13 @@
   \return true if success
 */
-bool MD2Data::loadSkin(const char* fileName)
-{
-  if( fileName == NULL)
-    {
-      this->skinFileName = NULL;
+bool MD2Data::loadSkin(const std::string& fileName)
+{
+  if( fileName.empty())
+    {
+      this->skinFileName = "";
       return false;
     }
 
-  this->skinFileName = new char[strlen(fileName)+1];
-  strcpy(this->skinFileName, fileName);
+  this->skinFileName = fileName;
 
   this->material.setName("md2ModelMaterial");
Index: trunk/src/lib/graphics/importer/md2Model.h
===================================================================
--- trunk/src/lib/graphics/importer/md2Model.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/md2Model.h	(revision 7221)
@@ -189,10 +189,10 @@
 {
  public:
-   MD2Data(const char* modelFileName, const char* skinFileName, float scale = 1.0f);
+   MD2Data(const std::string& modelFileName, const std::string& skinFileName, float scale = 1.0f);
   virtual ~MD2Data();
 
  private:
-  bool loadModel(const char* fileName);
-  bool loadSkin(const char* fileName = NULL);
+   bool loadModel(const std::string& fileName);
+   bool loadSkin(const std::string& fileName = "");
 
  public:
@@ -202,6 +202,6 @@
   int                numTexCoor;            //!< number of texture coordinates
   int                numGLCommands;         //!< number of gl commands in the glList (tells how to draw)
-  char*              fileName;              //!< file name of the model File
-  char*              skinFileName;          //!< file name of the skin file
+  std::string        fileName;              //!< file name of the model File
+  std::string        skinFileName;          //!< file name of the skin file
   MD2Header*         header;                //!< the header file
 
@@ -223,5 +223,5 @@
 
 public:
-  MD2Model(const char* modelFileName, const char* skinFileName = NULL, float scale = 1.0f);
+  MD2Model(const std::string& modelFileName, const std::string& skinFileName = "", float scale = 1.0f);
   virtual ~MD2Model();
 
Index: trunk/src/lib/graphics/importer/media_container.cc
===================================================================
--- trunk/src/lib/graphics/importer/media_container.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/media_container.cc	(revision 7221)
@@ -34,5 +34,5 @@
  * Default constructor
  */
-MediaContainer::MediaContainer(const char* filename)
+MediaContainer::MediaContainer(const std::string& filename)
 {
   // set the class id for the base object
@@ -41,6 +41,6 @@
   fps = 0;
   mediaLoaded = false;
-
-  this->loadMedia(filename);
+  if (!filename.empty())
+    this->loadMedia(filename);
 }
 
@@ -84,14 +84,14 @@
 }
 
-bool MediaContainer::loadMedia(const char* filename)
+bool MediaContainer::loadMedia(const std::string& filename)
 {
   this->unloadMedia();
 
-  if(filename == NULL)
+  if(filename.empty())
     return false;
   // check whether file exists
   if(!ResourceManager::isInDataDir(filename))
   {
-    PRINTF(1)("Could not find %s\n", filename);
+    PRINTF(1)("Could not find %s\n", filename.c_str());
     return false;
   }
@@ -101,7 +101,7 @@
 
   // Open video file
-  if (av_open_input_file(&format_context, ResourceManager::getFullName(filename), NULL, 0, NULL) !=0 )
-  {
-    PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename));
+  if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
+  {
+    PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
     return false;
   }
@@ -110,5 +110,5 @@
   if (av_find_stream_info(format_context) < 0)
   {
-    PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename));
+    PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
     return false;
   }
@@ -116,8 +116,8 @@
   // Find the first video stream and take it
   video_stream = av_find_default_stream_index(format_context);
-  
+
   if(video_stream == -1)
   {
-    PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename));
+    PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
     return false;
   }
@@ -202,5 +202,5 @@
       // Free the packet that was allocated by av_read_frame
       av_free_packet(&packet);
-      
+
       // Did we get a video frame?
       if(frame_finished)
@@ -216,5 +216,5 @@
           memcpy(&data[i*codec_context->width*3],
                  ((AVPicture*)RGB_frame)->data[0]+i *
-                 ((AVPicture*)RGB_frame)->linesize[0], 
+                 ((AVPicture*)RGB_frame)->linesize[0],
                   codec_context->width*sizeof(uint8_t)*3);
 
@@ -258,4 +258,4 @@
   }
   else
-    return NULL;
-}
+    return 0;
+}
Index: trunk/src/lib/graphics/importer/media_container.h
===================================================================
--- trunk/src/lib/graphics/importer/media_container.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/media_container.h	(revision 7221)
@@ -44,8 +44,8 @@
 public:
 
-  MediaContainer(const char* filename = NULL);
+  MediaContainer(const std::string& filename = "");
   virtual ~MediaContainer();
 
-  bool loadMedia(const char* filename);
+  bool loadMedia(const std::string& filename);
   void loadFrames();
 
Index: trunk/src/lib/graphics/importer/movie_player.cc
===================================================================
--- trunk/src/lib/graphics/importer/movie_player.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/movie_player.cc	(revision 7221)
@@ -31,5 +31,5 @@
 
 
-MoviePlayer::MoviePlayer(const char* filename)
+MoviePlayer::MoviePlayer(const std::string& filename)
 {
   // set the class id for the base object
@@ -42,6 +42,6 @@
   mediaLoaded = false;
 
-  this->loadMovie(filename);
-
+  if (!filename.empty())
+    this->loadMovie(filename);
 }
 
@@ -83,14 +83,14 @@
 
 
-bool MoviePlayer::loadMovie(const char* filename)
+bool MoviePlayer::loadMovie(const std::string& filename)
 {
   this->unloadMedia();
 
-  if(filename == NULL)
+  if(filename.empty())
     return false;
   // check whether file exists
   if(!ResourceManager::isInDataDir(filename))
   {
-    PRINTF(1)("Could not find %s\n", filename);
+    PRINTF(1)("Could not find %s\n", filename.c_str());
     return false;
   }
@@ -100,7 +100,7 @@
 
   // Open video file
-  if (av_open_input_file(&format_context, ResourceManager::getFullName(filename), NULL, 0, NULL) !=0 )
-  {
-    PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename));
+  if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
+  {
+    PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
     return false;
   }
@@ -109,5 +109,5 @@
   if (av_find_stream_info(format_context) < 0)
   {
-    PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename));
+    PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
     return false;
   }
@@ -118,5 +118,5 @@
   if(video_stream == -1)
   {
-    PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename));
+    PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
     return false;
   }
Index: trunk/src/lib/graphics/importer/movie_player.h
===================================================================
--- trunk/src/lib/graphics/importer/movie_player.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/movie_player.h	(revision 7221)
@@ -58,8 +58,8 @@
 public:
 
-  MoviePlayer(const char* filename = NULL);
+  MoviePlayer(const std::string& filename = "");
   virtual ~MoviePlayer();
 
-  bool loadMovie(const char* filename);
+  bool loadMovie(const std::string& filename);
 
   void start(float start_time);
Index: trunk/src/lib/graphics/importer/objModel.cc
===================================================================
--- trunk/src/lib/graphics/importer/objModel.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/objModel.cc	(revision 7221)
@@ -32,5 +32,6 @@
  * @param scaling The factor that the model will be scaled with.
 */
-OBJModel::OBJModel(const char* fileName, float scaling) : StaticModel(fileName)
+OBJModel::OBJModel(const std::string& fileName, float scaling)
+  : StaticModel(fileName)
 {
   this->setClassID(CL_OBJ_MODEL, "OBJModel");
@@ -51,9 +52,5 @@
 */
 OBJModel::~OBJModel()
-{
-  PRINTF(4)("Deleting the obj-names\n");
-  if (this->objPath)
-    delete []this->objPath;
-}
+{ }
 
 /**
@@ -63,6 +60,7 @@
    Splits the FileName from the DirectoryName
 */
-bool OBJModel::importFile (const char* fileName)
-{
+bool OBJModel::importFile (const std::string& fileNameInput)
+{
+  const char* fileName = fileNameInput.c_str();
   PRINTF(4)("preparing to read in file: %s\n", fileName);
   // splitting the
@@ -74,6 +72,6 @@
     {
       int len = split - fileName+1;
-      this->objPath = new char[len +2];
-      strncpy(this->objPath, fileName, len);
+      this->objPath =  fileName;
+      this->objPath.erase(len, this->objPath.size());
       this->objPath[len] = '\0';
       PRINTF(4)("Resolved file %s to Path %s.\n", fileName, this->objPath);
@@ -91,10 +89,10 @@
    This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks
 */
-bool OBJModel::readFromObjFile(const char* fileName)
+bool OBJModel::readFromObjFile(const std::string& fileName)
 {
   FILE* stream;
-  if( (stream = fopen (fileName, "r")) == NULL)
-    {
-      PRINTF(2)("Object File Could not be Opened %s\n", fileName);
+  if( (stream = fopen (fileName.c_str(), "r")) == NULL)
+    {
+      PRINTF(2)("Object File Could not be Opened %s\n", fileName.c_str());
       return false;
     }
@@ -162,14 +160,12 @@
  * that a material does not have to be able to read itself in from a File.
  */
-bool OBJModel::readMtlLib (const char* mtlFile)
-{
-  char* fileName = new char [strlen(this->objPath) + strlen(mtlFile)+1];
-  sprintf(fileName, "%s%s", this->objPath, mtlFile);
+bool OBJModel::readMtlLib (const std::string& mtlFile)
+{
+  std::string fileName = this->objPath + mtlFile;
 
   FILE* stream;
-  if( (stream = fopen (fileName, "r")) == NULL)
-    {
-      PRINTF(2)("MaterialLibrary could not be opened %s\n", fileName);
-      delete[] fileName;
+  if( (stream = fopen (fileName.c_str(), "r")) == NULL)
+    {
+      PRINTF(2)("MaterialLibrary could not be opened %s\n", fileName.c_str());
       return false;
     }
@@ -258,5 +254,4 @@
     }
   fclose(stream);
-  delete []fileName;
   return true;
 }
Index: trunk/src/lib/graphics/importer/objModel.h
===================================================================
--- trunk/src/lib/graphics/importer/objModel.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/objModel.h	(revision 7221)
@@ -13,15 +13,15 @@
 {
  public:
-  OBJModel(const char* fileName, float scaling = 1.0);
+   OBJModel(const std::string& fileName, float scaling = 1.0);
   virtual ~OBJModel();
 
  private:
   ///// readin /////
-  bool importFile (const char* fileName);
-  bool readFromObjFile (const char* fileName);
-  bool readMtlLib (const char* matFile);
+   bool importFile (const std::string& fileName);
+   bool readFromObjFile (const std::string& fileName);
+   bool readMtlLib (const std::string& matFile);
 
  private:
-  char*       objPath;     //!< The Path where the obj and mtl-file are located.
+   std::string       objPath;     //!< The Path where the obj and mtl-file are located.
 };
 
Index: trunk/src/lib/graphics/importer/static_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/static_model.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/static_model.cc	(revision 7221)
@@ -23,6 +23,4 @@
 #include <stdarg.h>
 
-#include "vector.h"
-
 using namespace std;
 
@@ -86,5 +84,5 @@
 {
   PRINTF(4)("Adding new Group\n");
-  this->name = NULL;
+  this->name = "";
   this->faceMode = -1;
   this->faceCount = 0;
@@ -109,7 +107,4 @@
   if (this->listNumber != 0)
     glDeleteLists(this->listNumber, 1);
-
-  if (this->name != NULL)
-    delete[] this->name;
 
   if (this->next !=NULL)
@@ -142,5 +137,5 @@
  * assigns it a Name and a Type
  */
-StaticModel::StaticModel(const char* modelName)
+StaticModel::StaticModel(const std::string& modelName)
 {
   this->setClassID(CL_STATIC_MODEL, "StaticModel");
@@ -230,9 +225,9 @@
   ModelGroup* tmpGroup = this->firstGroup;
   while (tmpGroup != NULL)
-    {
-      PRINTF(5)("Drawing model %s\n", tmpGroup->name);
-      glCallList (tmpGroup->listNumber);
-      tmpGroup = tmpGroup->next;
-    }
+  {
+    PRINTF(5)("Drawing model %s\n", tmpGroup->name);
+    glCallList (tmpGroup->listNumber);
+    tmpGroup = tmpGroup->next;
+  }
 }
 
@@ -247,22 +242,22 @@
 {
   if (unlikely(groupNumber >= this->groupCount))
-    {
-      PRINTF(2)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
-      return;
-    }
+  {
+    PRINTF(2)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
+    return;
+  }
   PRINTF(4)("drawing the requested 3D-Models if found.\n");
   ModelGroup* tmpGroup = this->firstGroup;
   int counter = 0;
   while (tmpGroup != NULL)
+  {
+    if (counter == groupNumber)
     {
-      if (counter == groupNumber)
-        {
-          PRINTF(4)("Drawing model number %i named %s\n", counter, tmpGroup->name);
-          glCallList (tmpGroup->listNumber);
-          return;
-        }
-      ++counter;
-      tmpGroup = tmpGroup->next;
+      PRINTF(4)("Drawing model number %i named %s\n", counter, tmpGroup->name);
+      glCallList (tmpGroup->listNumber);
+      return;
     }
+    ++counter;
+    tmpGroup = tmpGroup->next;
+  }
   PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->getName());
   return;
@@ -276,21 +271,19 @@
  * It does this by just calling the List that must have been created earlier.
  */
-void StaticModel::draw (char* groupName) const
-{
-  if (groupName == NULL)
-     return;
+void StaticModel::draw (const std::string& groupName) const
+{
   PRINTF(4)("drawing the requested 3D-Models if found.\n");
   ModelGroup* tmpGroup = this->firstGroup;
   while (tmpGroup != NULL)
+  {
+    if (tmpGroup->name == groupName)
     {
-      if (tmpGroup->name != NULL && !strcmp(tmpGroup->name, groupName))
-        {
-          PRINTF(4)("Drawing model %s\n", tmpGroup->name);
-          glCallList (tmpGroup->listNumber);
-          return;
-        }
-      tmpGroup = tmpGroup->next;
+      PRINTF(4)("Drawing model %s\n", tmpGroup->name.c_str());
+      glCallList (tmpGroup->listNumber);
+      return;
     }
-  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->getName());
+    tmpGroup = tmpGroup->next;
+  }
+  PRINTF(2)("Model Named %s in %s not Found.\n", groupName.c_str(), this->getName());
   return;
 }
@@ -341,5 +334,5 @@
  * @returns the added material
  */
-Material* StaticModel::addMaterial(const char* materialName)
+Material* StaticModel::addMaterial(const std::string& materialName)
 {
   ModelMaterial* modMat = new ModelMaterial;
@@ -357,9 +350,9 @@
  * @returns the Material if found, NULL otherwise
  */
-Material* StaticModel::findMaterialByName(const char* materialName)
+Material* StaticModel::findMaterialByName(const std::string& materialName)
 {
   list<ModelMaterial*>::iterator modMat;
   for  (modMat = this->materialList.begin(); modMat != this->materialList.end(); modMat++)
-    if (!strcmp((*modMat)->material->getName(), materialName))
+    if (materialName == (*modMat)->material->getName())
       return (*modMat)->material;
   return NULL;
@@ -373,18 +366,17 @@
  * With it you should be able to create Models with more than one SubModel inside
  */
-bool StaticModel::addGroup(const char* groupString)
+bool StaticModel::addGroup(const std::string& groupString)
 {
   PRINTF(5)("Read Group: %s.\n", groupString);
   if (this->groupCount != 0 && this->currentGroup->faceCount > 0)
-    {
-      // finalizeGroup(currentGroup);
-      this->currentGroup = this->currentGroup->next = new ModelGroup;
-    }
+  {
+    // finalizeGroup(currentGroup);
+    this->currentGroup = this->currentGroup->next = new ModelGroup;
+  }
   // setting the group name if not default.
-  if (strcmp(groupString, "default"))
-    {
-      this->currentGroup->name = new char [strlen(groupString)+1];
-      strcpy(this->currentGroup->name, groupString);
-    }
+  if (groupString == "default")
+  {
+    this->currentGroup->name = groupString;
+  }
   ++this->groupCount;
 }
@@ -396,10 +388,10 @@
  *  If a vertex line is found this function will inject it into the vertex-Array
  */
-bool StaticModel::addVertex (const char* vertexString)
+bool StaticModel::addVertex (const std::string& vertexString)
 {
   float subbuffer1;
   float subbuffer2;
   float subbuffer3;
-  sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
+  sscanf (vertexString.c_str(), "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
   this->vertices.push_back(subbuffer1*scaleFactor);
   this->vertices.push_back(subbuffer2*scaleFactor);
@@ -431,10 +423,10 @@
  * If a vertexNormal line is found this function will inject it into the vertexNormal-Array
  */
-bool StaticModel::addVertexNormal (const char* normalString)
+bool StaticModel::addVertexNormal (const std::string& normalString)
 {
   float subbuffer1;
   float subbuffer2;
   float subbuffer3;
-  sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
+  sscanf (normalString.c_str(), "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
   this->normals.push_back(subbuffer1);
   this->normals.push_back(subbuffer2);
@@ -471,9 +463,9 @@
  * !! WARNING THIS IS DIFFERNT FROM addVervexTexture(float, float); because it changes the second entry to 1-v !!
  */
-bool StaticModel::addVertexTexture (const char* vTextureString)
+bool StaticModel::addVertexTexture (const std::string& vTextureString)
 {
   float subbuffer1;
   float subbuffer2;
-  sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
+  sscanf (vTextureString.c_str(), "%f %f", &subbuffer1, &subbuffer2);
   this->vTexture.push_back(subbuffer1);
   this->vTexture.push_back(1 - subbuffer2);
@@ -507,7 +499,10 @@
  * String is different from the argument addFace,
  * in this, that the first Vertex/Normal/Texcoord is 1 instead of 0
- */
-bool StaticModel::addFace (const char* faceString)
-{
+ *
+ * @TODO make it std::string conform
+ */
+bool StaticModel::addFace (const std::string& faceStringInput)
+{
+  const char* faceString = faceStringInput.c_str();
   if (this->currentGroup->faceCount >0)
     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace;
@@ -516,42 +511,42 @@
   tmpElem->next = NULL;
   while(strcmp (faceString, "\0"))
+  {
+    if (this->currentGroup->currentFace->vertexCount>0)
+      tmpElem = tmpElem->next = new ModelFaceElement;
+    tmpElem->next = NULL;
+
+    char tmpValue [50];
+    int tmpLen;
+    char* vertex = NULL;
+    char* texture = NULL;
+    char* normal = NULL;
+
+    sscanf (faceString, "%s", tmpValue);
+    tmpLen = strlen(tmpValue);
+    vertex = tmpValue;
+
+    if ((texture = strstr (vertex, "/")) != NULL)
     {
-      if (this->currentGroup->currentFace->vertexCount>0)
-          tmpElem = tmpElem->next = new ModelFaceElement;
-      tmpElem->next = NULL;
-
-      char tmpValue [50];
-      int tmpLen;
-      char* vertex = NULL;
-      char* texture = NULL;
-      char* normal = NULL;
-
-      sscanf (faceString, "%s", tmpValue);
-      tmpLen = strlen(tmpValue);
-      vertex = tmpValue;
-
-      if ((texture = strstr (vertex, "/")) != NULL)
-        {
-          texture[0] = '\0';
-          texture ++;
-
-          if ((normal = strstr (texture, "/")) !=NULL)
-            {
-              normal[0] = '\0';
-              normal ++;
-            }
-        }
-      if (vertex)
-        tmpElem->vertexNumber = atoi(vertex)-1;
-      if (texture)
-        tmpElem->texCoordNumber = atoi(texture)-1;
-      if (normal)
-        tmpElem->normalNumber = atoi(normal)-1;
-
-      faceString += tmpLen;
-      if (strcmp (faceString, "\0"))
-        faceString++;
-      this->currentGroup->currentFace->vertexCount++;
+      texture[0] = '\0';
+      texture ++;
+
+      if ((normal = strstr (texture, "/")) !=NULL)
+      {
+        normal[0] = '\0';
+        normal ++;
+      }
     }
+    if (vertex)
+      tmpElem->vertexNumber = atoi(vertex)-1;
+    if (texture)
+      tmpElem->texCoordNumber = atoi(texture)-1;
+    if (normal)
+      tmpElem->normalNumber = atoi(normal)-1;
+
+    faceString += tmpLen;
+    if (strcmp (faceString, "\0"))
+      faceString++;
+    this->currentGroup->currentFace->vertexCount++;
+  }
 
   this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2;
@@ -575,15 +570,15 @@
 
   for (int i = 0; i < faceElemCount; i++)
-    {
-      if (this->currentGroup->currentFace->vertexCount > 0)
-        tmpElem = tmpElem->next = new ModelFaceElement;
-
-      tmpElem->vertexNumber = va_arg (itemlist, int);
-      if (type & TEXCOORD)
-        tmpElem->texCoordNumber = va_arg (itemlist, int);
-      if (type & NORMAL)
-        tmpElem->normalNumber = va_arg(itemlist, int);
-      this->currentGroup->currentFace->vertexCount++;
-    }
+  {
+    if (this->currentGroup->currentFace->vertexCount > 0)
+      tmpElem = tmpElem->next = new ModelFaceElement;
+
+    tmpElem->vertexNumber = va_arg (itemlist, int);
+    if (type & TEXCOORD)
+      tmpElem->texCoordNumber = va_arg (itemlist, int);
+    if (type & NORMAL)
+      tmpElem->normalNumber = va_arg(itemlist, int);
+    this->currentGroup->currentFace->vertexCount++;
+  }
   va_end(itemlist);
 
@@ -596,5 +591,5 @@
  * @param matString the Material that will be set.
 */
-bool StaticModel::setMaterial(const char* matString)
+bool StaticModel::setMaterial(const std::string& matString)
 {
   if (this->currentGroup->faceCount > 0)
@@ -647,60 +642,60 @@
   ModelGroup* tmpGroup = firstGroup;
   while (tmpGroup != NULL)
+  {
+    ModelFace* tmpFace = tmpGroup->firstFace;
+    while (tmpFace != NULL)
     {
-      ModelFace* tmpFace = tmpGroup->firstFace;
-      while (tmpFace != NULL)
+      if (tmpFace->firstElem != NULL)
+      {
+        ModelFaceElement* firstElem = tmpFace->firstElem;
+        ModelFaceElement* prevElem;
+        ModelFaceElement* curElem = firstElem;
+        ModelFaceElement* nextElem;
+        ModelFaceElement* lastElem;
+        // find last Element of the Chain. !! IMPORTANT:the last Element of the Chain must point to NULL, or it will resolv into an infinity-loop.
+        while (curElem != NULL)
         {
-          if (tmpFace->firstElem != NULL)
-            {
-              ModelFaceElement* firstElem = tmpFace->firstElem;
-              ModelFaceElement* prevElem;
-              ModelFaceElement* curElem = firstElem;
-              ModelFaceElement* nextElem;
-              ModelFaceElement* lastElem;
-              // find last Element of the Chain. !! IMPORTANT:the last Element of the Chain must point to NULL, or it will resolv into an infinity-loop.
-              while (curElem != NULL)
-                {
-                  prevElem = curElem;
-                  curElem = curElem->next;
-                }
-              lastElem = prevElem;
-
-              curElem = firstElem;
-              for (int j=0; j<tmpFace->vertexCount; j++)
-                {
-                  if (!(nextElem = curElem->next))
-                    nextElem = firstElem;
-                  curElem->normalNumber = curElem->vertexNumber;
-
-                  curV = Vector (this->vertices[curElem->vertexNumber*3],
-				 this->vertices[curElem->vertexNumber*3+1],
-				 this->vertices[curElem->vertexNumber*3+2]);
-
-                  prevV = Vector (this->vertices[prevElem->vertexNumber*3],
-				  this->vertices[prevElem->vertexNumber*3+1],
-				  this->vertices[prevElem->vertexNumber*3+2]) - curV;
-
-                  nextV = Vector (this->vertices[nextElem->vertexNumber*3],
-				  this->vertices[nextElem->vertexNumber*3+1],
-				  this->vertices[nextElem->vertexNumber*3+2]) - curV;
-                  normArray[curElem->vertexNumber] = normArray[curElem->vertexNumber] + nextV.cross(prevV);
-
-                  prevElem = curElem;
-                  curElem = curElem->next;
-                }
-            }
-          tmpFace = tmpFace->next;
+          prevElem = curElem;
+          curElem = curElem->next;
         }
-      tmpGroup = tmpGroup->next;
+        lastElem = prevElem;
+
+        curElem = firstElem;
+        for (int j=0; j<tmpFace->vertexCount; j++)
+        {
+          if (!(nextElem = curElem->next))
+            nextElem = firstElem;
+          curElem->normalNumber = curElem->vertexNumber;
+
+          curV = Vector (this->vertices[curElem->vertexNumber*3],
+                         this->vertices[curElem->vertexNumber*3+1],
+                         this->vertices[curElem->vertexNumber*3+2]);
+
+          prevV = Vector (this->vertices[prevElem->vertexNumber*3],
+                          this->vertices[prevElem->vertexNumber*3+1],
+                          this->vertices[prevElem->vertexNumber*3+2]) - curV;
+
+          nextV = Vector (this->vertices[nextElem->vertexNumber*3],
+                          this->vertices[nextElem->vertexNumber*3+1],
+                          this->vertices[nextElem->vertexNumber*3+2]) - curV;
+          normArray[curElem->vertexNumber] = normArray[curElem->vertexNumber] + nextV.cross(prevV);
+
+          prevElem = curElem;
+          curElem = curElem->next;
+        }
+      }
+      tmpFace = tmpFace->next;
     }
+    tmpGroup = tmpGroup->next;
+  }
 
   for (int i=0; i < this->vertices.size()/3;i++)
-    {
-      normArray[i].normalize();
-      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
-
-      this->addVertexNormal(normArray[i].x, normArray[i].y, normArray[i].z);
-
-    }
+  {
+    normArray[i].normalize();
+    PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
+
+    this->addVertexNormal(normArray[i].x, normArray[i].y, normArray[i].z);
+
+  }
   delete[] normArray;
 }
@@ -721,79 +716,79 @@
 
   while (this->currentGroup != NULL)
+  {
+
+    // creating a glList for the Group
+    if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
     {
-
-      // creating a glList for the Group
-      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
+      PRINTF(2)("glList could not be created for this Model\n");
+      return false;
+    }
+    glNewList (this->currentGroup->listNumber, GL_COMPILE);
+
+    // Putting Faces to GL
+    ModelFace* tmpFace = this->currentGroup->firstFace;
+    while (tmpFace != NULL)
+    {
+      if (tmpFace->vertexCount == 0 && tmpFace->material != NULL)
+      {
+        if (this->currentGroup->faceMode != -1)
+          glEnd();
+        this->currentGroup->faceMode = 0;
+        Material* tmpMat;
+        if (tmpFace->material != NULL)
         {
-          PRINTF(2)("glList could not be created for this Model\n");
-          return false;
+          tmpFace->material->select();
+          PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->getName());
         }
-      glNewList (this->currentGroup->listNumber, GL_COMPILE);
-
-      // Putting Faces to GL
-      ModelFace* tmpFace = this->currentGroup->firstFace;
-      while (tmpFace != NULL)
+      }
+
+      else if (tmpFace->vertexCount == 3)
+      {
+        if (this->currentGroup->faceMode != 3)
         {
-          if (tmpFace->vertexCount == 0 && tmpFace->material != NULL)
-            {
-              if (this->currentGroup->faceMode != -1)
-                glEnd();
-              this->currentGroup->faceMode = 0;
-              Material* tmpMat;
-              if (tmpFace->material != NULL)
-                {
-                  tmpFace->material->select();
-                  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->getName());
-                }
-            }
-
-          else if (tmpFace->vertexCount == 3)
-            {
-              if (this->currentGroup->faceMode != 3)
-                {
-                  if (this->currentGroup->faceMode != -1)
-                    glEnd();
-                  glBegin(GL_TRIANGLES);
-                }
-
-              this->currentGroup->faceMode = 3;
-              PRINTF(5)("found triag.\n");
-            }
-
-          else if (tmpFace->vertexCount == 4)
-            {
-              if (this->currentGroup->faceMode != 4)
-                {
-                  if (this->currentGroup->faceMode != -1)
-                    glEnd();
-                  glBegin(GL_QUADS);
-                }
-              this->currentGroup->faceMode = 4;
-              PRINTF(5)("found quad.\n");
-            }
-
-          else if (tmpFace->vertexCount > 4)
-            {
-              if (this->currentGroup->faceMode != -1)
-                glEnd();
-              glBegin(GL_POLYGON);
-              PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount);
-              this->currentGroup->faceMode = tmpFace->vertexCount;
-            }
-
-          ModelFaceElement* tmpElem = tmpFace->firstElem;
-          while (tmpElem != NULL)
-            {
-              //      PRINTF(2)("%s\n", tmpElem->value);
-              this->addGLElement(tmpElem);
-              tmpElem = tmpElem->next;
-            }
-          tmpFace = tmpFace->next;
+          if (this->currentGroup->faceMode != -1)
+            glEnd();
+          glBegin(GL_TRIANGLES);
         }
-      glEnd();
-      glEndList();
-
-      this->currentGroup = this->currentGroup->next;
+
+        this->currentGroup->faceMode = 3;
+        PRINTF(5)("found triag.\n");
+      }
+
+      else if (tmpFace->vertexCount == 4)
+      {
+        if (this->currentGroup->faceMode != 4)
+        {
+          if (this->currentGroup->faceMode != -1)
+            glEnd();
+          glBegin(GL_QUADS);
+        }
+        this->currentGroup->faceMode = 4;
+        PRINTF(5)("found quad.\n");
+      }
+
+      else if (tmpFace->vertexCount > 4)
+      {
+        if (this->currentGroup->faceMode != -1)
+          glEnd();
+        glBegin(GL_POLYGON);
+        PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount);
+        this->currentGroup->faceMode = tmpFace->vertexCount;
+      }
+
+      ModelFaceElement* tmpElem = tmpFace->firstElem;
+      while (tmpElem != NULL)
+      {
+        //      PRINTF(2)("%s\n", tmpElem->value);
+        this->addGLElement(tmpElem);
+        tmpElem = tmpElem->next;
+      }
+      tmpFace = tmpFace->next;
     }
+    glEnd();
+    glEndList();
+
+    this->currentGroup = this->currentGroup->next;
+  }
 }
 
@@ -814,4 +809,6 @@
   ModelFace* tmpFace;              //!< the temporary face referece
 
+  bool warned = false;
+
   /* count the number of triangles */
   /* now iterate through all groups and build up the triangle list */
@@ -834,6 +831,10 @@
       else if( tmpFace->vertexCount > 4)
       {
-        PRINTF(1)("This model (%s) got over 4 vertices per face <=> conflicts in the CD engine!\n", this->getName());
-      //exit(0);
+        if (!warned)
+        {
+          PRINTF(2)("This model (%s) got over 4 vertices per face <=> conflicts in the CD engine!\n", this->getName());
+          warned = true;
+        }
+        //exit(0);
       }
       tmpFace = tmpFace->next;
@@ -858,5 +859,5 @@
   while( this->currentGroup != NULL)
   {
-      // Putting Faces to GL
+    // Putting Faces to GL
     tmpFace = this->currentGroup->firstFace;
     while( tmpFace != NULL)
@@ -931,27 +932,27 @@
 
   if (elem->texCoordNumber != -1)
-    {
-      if (likely(elem->texCoordNumber < this->pModelInfo.numTexCoor))
-        glTexCoord2fv(&this->vTexture[0] + elem->texCoordNumber * 2);
-      else
-        PRINTF(2)("TextureCoordinate %d is not in the List (max: %d)\nThe Model might be incomplete\n",
-                  elem->texCoordNumber, this->pModelInfo.numTexCoor);
-    }
+  {
+    if (likely(elem->texCoordNumber < this->pModelInfo.numTexCoor))
+      glTexCoord2fv(&this->vTexture[0] + elem->texCoordNumber * 2);
+    else
+      PRINTF(2)("TextureCoordinate %d is not in the List (max: %d)\nThe Model might be incomplete\n",
+                elem->texCoordNumber, this->pModelInfo.numTexCoor);
+  }
   if (elem->normalNumber != -1)
-    {
+  {
     if (likely(elem->normalNumber < this->pModelInfo.numNormals))
       glNormal3fv(&this->normals[0] + elem->normalNumber * 3);
     else
-        PRINTF(2)("Normal %d is not in the List (max: %d)\nThe Model might be incomplete",
-                  elem->normalNumber, this->pModelInfo.numNormals);
-    }
+      PRINTF(2)("Normal %d is not in the List (max: %d)\nThe Model might be incomplete",
+                elem->normalNumber, this->pModelInfo.numNormals);
+  }
   if (elem->vertexNumber != -1)
-    {
-      if (likely(elem->vertexNumber < this->pModelInfo.numVertices))
-          glVertex3fv(&this->vertices[0]+ elem->vertexNumber * 3);
-      else
-        PRINTF(2)("Vertex %d is not in the List (max: %d)\nThe Model might be incomplete",
-                  elem->vertexNumber, this->pModelInfo.numVertices);
-    }
+  {
+    if (likely(elem->vertexNumber < this->pModelInfo.numVertices))
+      glVertex3fv(&this->vertices[0]+ elem->vertexNumber * 3);
+    else
+      PRINTF(2)("Vertex %d is not in the List (max: %d)\nThe Model might be incomplete",
+                elem->vertexNumber, this->pModelInfo.numVertices);
+  }
 
 }
Index: trunk/src/lib/graphics/importer/static_model.h
===================================================================
--- trunk/src/lib/graphics/importer/static_model.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/static_model.h	(revision 7221)
@@ -13,7 +13,4 @@
 #include <vector>
 #include <list>
-
-// FORWARD DECLARATION //
-template<class T> class tArray;
 
 // definition of different modes for setting up Faces
@@ -70,5 +67,5 @@
   void cleanup();
 
-  char*        name;           //!< the Name of the Group. this is an identifier, that can be accessed via the draw (char* name) function.
+  std::string  name;           //!< the Name of the Group. this is an identifier, that can be accessed via the draw (std::string name) function.
   GLubyte*     indices;        //!< The indices of the Groups. Needed for vertex-arrays
   GLuint       listNumber;     //!< The number of the GL-List this Group gets.
@@ -98,31 +95,31 @@
 {
  public:
-  StaticModel(const char* modelName = NULL);
+  StaticModel(const std::string& modelName = "");
   virtual ~StaticModel();
 
   virtual void draw() const;
   void draw(int groupNumber) const;
-  void draw(char* groupName) const;
+  void draw(const std::string& groupName) const;
 
   void rebuild();
 
   Material* addMaterial(Material* material);
-  Material* addMaterial(const char* materialName);
+  Material* addMaterial(const std::string& materialName);
 
-  bool addGroup(const char* groupString);
+  bool addGroup(const std::string& groupString);
 
-  bool addVertex(const char* vertexString);
+  bool addVertex(const std::string& vertexString);
   bool addVertex(float x, float y, float z);
 
-  bool addFace(const char* faceString);
+  bool addFace(const std::string& faceString);
   bool addFace(int faceElemCount, VERTEX_FORMAT type, ...);
 
-  bool addVertexNormal(const char* normalString);
+  bool addVertexNormal(const std::string& normalString);
   bool addVertexNormal(float x, float y, float z);
 
-  bool addVertexTexture(const char* vTextureString);
+  bool addVertexTexture(const std::string& vTextureString);
   bool addVertexTexture(float u, float v);
 
-  bool setMaterial(const char* mtlString);
+  bool setMaterial(const std::string& mtlString);
   bool setMaterial(Material* mtl);
 
@@ -133,5 +130,5 @@
   void cubeModel();
 
-  Material* findMaterialByName(const char* materialName);
+  Material* findMaterialByName(const std::string& materialName);
 
  protected:
Index: trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- trunk/src/lib/graphics/importer/texture.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/texture.cc	(revision 7221)
@@ -32,5 +32,5 @@
  *  Constructor for a Texture
 */
-Texture::Texture(const char* imageName, GLenum target)
+Texture::Texture(const std::string& imageName, GLenum target)
 {
   this->setClassID(CL_TEXTURE, "Texture");
@@ -41,5 +41,5 @@
   this->priority = 0.5;
 
-  if (imageName != NULL)
+  if (!imageName.empty())
   {
     this->setName(imageName);
@@ -67,5 +67,5 @@
  * @param imageName The image to load
 */
-bool Texture::loadImage(const char* imageName, GLenum target)
+bool Texture::loadImage(const std::string& imageName, GLenum target)
 {
   if (Texture::texturesEnabled)
@@ -81,5 +81,5 @@
       this->texture = 0;
     }
-    if (imageName != NULL)
+    if (!imageName.empty())
     {
       SDL_Surface* tmpSurf;
@@ -87,5 +87,5 @@
         glDeleteTextures(1, &this->texture);
       // load the new Image to memory
-      tmpSurf = IMG_Load(imageName);
+      tmpSurf = IMG_Load(imageName.c_str());
       if(tmpSurf != NULL)
       {
Index: trunk/src/lib/graphics/importer/texture.h
===================================================================
--- trunk/src/lib/graphics/importer/texture.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/texture.h	(revision 7221)
@@ -18,9 +18,9 @@
   {
     public:
-      Texture(const char* imageName = NULL, GLenum target = GL_TEXTURE_2D);
+      Texture(const std::string& imageName = "", GLenum target = GL_TEXTURE_2D);
   //  Texture(TEXTURE_TYPE type, int resolution);
       virtual ~Texture();
 
-      bool loadImage(const char* imageName, GLenum target = GL_TEXTURE_2D);
+      bool loadImage(const std::string& imageName, GLenum target = GL_TEXTURE_2D);
       virtual bool rebuild();
 
Index: trunk/src/lib/graphics/importer/texture_sequence.cc
===================================================================
--- trunk/src/lib/graphics/importer/texture_sequence.cc	(revision 7199)
+++ trunk/src/lib/graphics/importer/texture_sequence.cc	(revision 7221)
@@ -124,10 +124,7 @@
  * @returns true on success
  */
-bool TextureSequence::addFrame(const char* imageName)
+bool TextureSequence::addFrame(const std::string& imageName)
 {
-  if (imageName == NULL)
-    return false;
-
-  SDL_Surface* addSurface = IMG_Load(imageName);
+  SDL_Surface* addSurface = IMG_Load(imageName.c_str());
   bool success = this->addFrame(addSurface);
   delete addSurface;
Index: trunk/src/lib/graphics/importer/texture_sequence.h
===================================================================
--- trunk/src/lib/graphics/importer/texture_sequence.h	(revision 7199)
+++ trunk/src/lib/graphics/importer/texture_sequence.h	(revision 7221)
@@ -23,5 +23,5 @@
     bool loadImageSeries(unsigned int count, ...);
     bool loadImageSeries(unsigned int count, va_list textureNames);
-    bool addFrame(const char* image);
+    bool addFrame(const std::string& image);
     bool addFrame(SDL_Surface* surface);
     bool addFrame(GLuint texture);
Index: trunk/src/lib/graphics/render2D/billboard.cc
===================================================================
--- trunk/src/lib/graphics/render2D/billboard.cc	(revision 7199)
+++ trunk/src/lib/graphics/render2D/billboard.cc	(revision 7221)
@@ -78,5 +78,5 @@
 void Billboard::loadParams(const TiXmlElement* root)
 {
-  LoadParam(root, "texture", this, Billboard, setTexture)
+  LoadParam(root, "texture", this->material, Material, setDiffuseMap)
       .describe("the texture-file to load onto the Billboard");
 
@@ -100,5 +100,5 @@
  * @param textureFile The texture-file to load onto the crosshair
  */
-void Billboard::setTexture(const char* textureFile)
+void Billboard::setTexture(const std::string& textureFile)
 {
   this->material->setDiffuseMap(textureFile);
Index: trunk/src/lib/graphics/render2D/billboard.h
===================================================================
--- trunk/src/lib/graphics/render2D/billboard.h	(revision 7199)
+++ trunk/src/lib/graphics/render2D/billboard.h	(revision 7221)
@@ -30,5 +30,5 @@
 
     void setSize(float sizeX, float sizeY);
-    void setTexture(const char* textureFile);
+    void setTexture(const std::string& textureFile);
     void attachTo(PNode* pnode);
 
Index: trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.cc	(revision 7199)
+++ trunk/src/lib/graphics/render2D/element_2d.cc	(revision 7221)
@@ -180,13 +180,13 @@
  * @param alignment the alignment @see loadParams
 */
-void Element2D::setAlignment(const char* alignment)
-{
-  if (!strcmp(alignment, "center"))
+void Element2D::setAlignment(const std::string& alignment)
+{
+  if (alignment == "center")
     this->setAlignment(E2D_ALIGN_CENTER);
-  else if (!strcmp(alignment, "left"))
+  else if (alignment == "left")
     this->setAlignment(E2D_ALIGN_LEFT);
-  else if (!strcmp(alignment, "right"))
+  else if (alignment == "right")
     this->setAlignment(E2D_ALIGN_RIGHT);
-  else if (!strcmp(alignment, "screen-center"))
+  else if (alignment == "screen-center")
     this->setAlignment(E2D_ALIGN_SCREEN_CENTER);
 }
@@ -213,7 +213,7 @@
 /**
  * sets the layer onto which this 2D-element is projected to.
- * @param layer the layer @see loadParams @see Element2D::charToLayer2D(const char* layer)
- */
-void Element2D::setLayer(const char* layer)
+ * @param layer the layer @see loadParams @see Element2D::charToLayer2D(const std::string& layer)
+ */
+void Element2D::setLayer(const std::string& layer)
 {
   this->setLayer(Element2D::charToLayer2D(layer));
@@ -235,5 +235,5 @@
  * @param bindNode the name of the Node (should be existing)
  */
-void Element2D::setBindNode(const char* bindNode)
+void Element2D::setBindNode(const std::string& bindNode)
 {
   const PNode* tmpBindNode = dynamic_cast<const PNode*>(ClassList::getObject(bindNode, CL_PARENT_NODE));
@@ -572,5 +572,5 @@
  * @param childName the name of the child to add to this PNode
  */
-void Element2D::addChild2D (const char* childName)
+void Element2D::addChild2D (const std::string& childName)
 {
   Element2D* childNode = dynamic_cast<Element2D*>(ClassList::getObject(childName, CL_ELEMENT_2D));
@@ -651,5 +651,5 @@
  * @param parentName the name of the Parent to set to this Element2D
  */
-void Element2D::setParent2D (const char* parentName)
+void Element2D::setParent2D (const std::string& parentName)
 {
   Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));
@@ -658,5 +658,5 @@
   else
     PRINTF(2)("Not Found Element2D's (%s::%s) new Parent by Name: %s\n",
-                this->getClassName(), this->getName(), parentName);
+                this->getClassName(), this->getName(), parentName.c_str());
 }
 
@@ -704,5 +704,5 @@
  * @param bias the speed to iterate to this new Positions
  */
-void Element2D::setParentSoft2D(const char* parentName, float bias)
+void Element2D::setParentSoft2D(const std::string& parentName, float bias)
 {
   Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));
@@ -724,7 +724,7 @@
  * @param parentMode a String representing this parentingMode
  */
-void Element2D::setParentMode2D (const char* parentingMode)
-{
-  this->setParentMode2D(Element2D::charToParentingMode2D(parentingMode));
+void Element2D::setParentMode2D (const std::string& parentingMode)
+{
+  this->setParentMode2D(Element2D::stringToParentingMode2D(parentingMode));
 }
 
@@ -952,5 +952,5 @@
             this->relCoordinate.y,
             this->getAbsDir2D(),
-            Element2D::parentingModeToChar2D(parentMode),
+            Element2D::parentingModeToString2D(parentMode),
             Element2D::layer2DToChar(this->layer));
 
@@ -1074,5 +1074,5 @@
  * @return the converted string
  */
-const char* Element2D::parentingModeToChar2D(int parentingMode)
+const char* Element2D::parentingModeToString2D(int parentingMode)
 {
   if (parentingMode == E2D_PARENT_LOCAL_ROTATE)
@@ -1093,15 +1093,15 @@
  * @return the int corresponding to the named parentingMode
  */
-E2D_PARENT_MODE Element2D::charToParentingMode2D(const char* parentingMode)
-{
-  if (!strcmp(parentingMode, "local-rotate"))
+E2D_PARENT_MODE Element2D::stringToParentingMode2D(const std::string& parentingMode)
+{
+  if (parentingMode == "local-rotate")
     return (E2D_PARENT_LOCAL_ROTATE);
-  else  if (!strcmp(parentingMode, "rotate-movement"))
+  else  if (parentingMode == "rotate-movement")
     return (E2D_PARENT_ROTATE_MOVEMENT);
-  else  if (!strcmp(parentingMode, "movement"))
+  else  if (parentingMode == "movement")
     return (E2D_PARENT_MOVEMENT);
-  else  if (!strcmp(parentingMode, "all"))
+  else  if (parentingMode == "all")
     return (E2D_PARENT_ALL);
-  else  if (!strcmp(parentingMode, "rotate-and-move"))
+  else  if (parentingMode == "rotate-and-move")
     return (E2D_PARENT_ROTATE_AND_MOVE);
 }
@@ -1139,13 +1139,13 @@
  * @returns the E2D_LAYER on success, E2D_DEFAULT_LAYER on error.
  */
-E2D_LAYER Element2D::charToLayer2D(const char* layer)
-{
-  if (!strcmp(layer, "top"))
+E2D_LAYER Element2D::charToLayer2D(const std::string& layer)
+{
+  if (layer =="top")
     return (E2D_LAYER_TOP);
-  else  if (!strcmp(layer, "medium"))
+  else  if (layer == "medium")
     return (E2D_LAYER_MEDIUM);
-  else  if (!strcmp(layer, "bottom"))
+  else  if (layer == "bottom")
     return (E2D_LAYER_BOTTOM);
-  else  if (!strcmp(layer, "below-all"))
+  else  if (layer == "below-all")
     return (E2D_LAYER_BELOW_ALL);
   else
Index: trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.h	(revision 7199)
+++ trunk/src/lib/graphics/render2D/element_2d.h	(revision 7221)
@@ -102,10 +102,10 @@
     /** @param alignment the new Alignment of the 2D-Element */
     inline void setAlignment(E2D_ALIGNMENT alignment) { this->alignment = alignment; };
-    void setAlignment(const char* alignment);
+    void setAlignment(const std::string& alignment);
     inline E2D_ALIGNMENT getAlignment() const { return this->alignment; };
 
     // LAYERING //
     void setLayer(E2D_LAYER layer);
-    void setLayer(const char* layer);
+    void setLayer(const std::string& layer);
     /** @returns the Layer this Element is drawn to */
     inline E2D_LAYER getLayer() const { return this->layer; };
@@ -121,5 +121,5 @@
     /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */
     inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };
-    void setBindNode(const char* bindNode);
+    void setBindNode(const std::string& bindNode);
     inline const PNode* getBindNode() const { return this->bindNode; };
 
@@ -181,5 +181,5 @@
 
     void addChild2D (Element2D* child);
-    void addChild2D (const char* childName);
+    void addChild2D (const std::string& childName);
     void removeChild2D (Element2D* child);
     void remove2D();
@@ -187,5 +187,5 @@
     /** @param parent the new parent of this Element2D */
     void setParent2D (Element2D* parent) { parent->addChild2D(this); };
-    void setParent2D (const char* parentName);
+    void setParent2D (const std::string& parentName);
     /** @returns the parent of this Element2D */
     inline Element2D* getParent2D () const { return this->parent; };
@@ -194,8 +194,8 @@
 
     void setParentSoft2D(Element2D* parentNode, float bias = 1.0);
-    void setParentSoft2D(const char* parentName, float bias = 1.0);
+    void setParentSoft2D(const std::string& parentName, float bias = 1.0);
 
     void setParentMode2D (E2D_PARENT_MODE parentMode);
-    void setParentMode2D (const char* parentingMode);
+    void setParentMode2D (const std::string& parentingMode);
     /** @returns the Parenting mode of this node */
     int getParentMode2D() const { return this->parentMode; };
@@ -212,9 +212,9 @@
 
     // helper functions //
-    static const char* parentingModeToChar2D(int parentingMode);
-    static E2D_PARENT_MODE charToParentingMode2D(const char* parentingMode);
+    static const char* parentingModeToString2D(int parentingMode);
+    static E2D_PARENT_MODE stringToParentingMode2D(const std::string& parentingMode);
 
     static const char* layer2DToChar(E2D_LAYER layer);
-    static E2D_LAYER charToLayer2D(const char* layer);
+    static E2D_LAYER charToLayer2D(const std::string& layer);
 
   private:
Index: trunk/src/lib/graphics/shader.cc
===================================================================
--- trunk/src/lib/graphics/shader.cc	(revision 7199)
+++ trunk/src/lib/graphics/shader.cc	(revision 7221)
@@ -36,10 +36,10 @@
  * standard constructor
 */
-Shader::Shader (const char* vertexShaderFile, const char* fragmentShaderFile)
+Shader::Shader (const std::string& vertexShaderFile, const std::string& fragmentShaderFile)
 {
    this->setClassID(CL_SHADER, "Shader");
 
-   this->fragmentShaderFile = NULL;
-   this->vertexShaderFile = NULL;
+   this->fragmentShaderFile = "";
+   this->vertexShaderFile = "";
    this->shaderProgram = 0;
    this->vertexShader = 0;
@@ -52,7 +52,7 @@
        this->shaderProgram = glCreateProgramObjectARB();
 
-       if (vertexShaderFile != NULL)
+       if (!vertexShaderFile.empty())
          this->loadShaderProgramm(SHADER_VERTEX, vertexShaderFile);
-       if (fragmentShaderFile != NULL)
+       if (!fragmentShaderFile.empty())
          this->loadShaderProgramm(SHADER_FRAGMENT, fragmentShaderFile);
        glLinkProgramARB(this->shaderProgram);
@@ -103,5 +103,5 @@
 }
 
-Shader* Shader::getShader(const char* vertexShaderFile, const char* fragmentShaderFile)
+Shader* Shader::getShader(const std::string& vertexShaderFile, const std::string& fragmentShaderFile)
 {
   return (Shader*)ResourceManager::getInstance()->load(vertexShaderFile, SHADER,  RP_LEVEL, fragmentShaderFile);
@@ -116,5 +116,5 @@
 
 
-bool Shader::loadShaderProgramm(SHADER_TYPE type, const char* fileName)
+bool Shader::loadShaderProgramm(SHADER_TYPE type, const std::string& fileName)
 {
   GLhandleARB shader = 0;
@@ -129,6 +129,5 @@
   if (type == SHADER_VERTEX && GLEW_ARB_vertex_shader)
   {
-    this->vertexShaderFile = new char[strlen(fileName)+1];
-    strcpy(this->vertexShaderFile, fileName);
+    this->vertexShaderFile = fileName;
 
     shader = this->vertexShader = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);
@@ -137,6 +136,5 @@
   if (type == SHADER_FRAGMENT && GLEW_ARB_fragment_shader)
   {
-    this->fragmentShaderFile = new char[strlen(fileName)+1];
-    strcpy(this->fragmentShaderFile, fileName);
+    this->fragmentShaderFile = fileName;
 
     shader = this->fragmentShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
@@ -146,5 +144,6 @@
   {
     GLint status = 0;
-    glShaderSourceARB(shader, program->size(), (const char**)&(*program)[0], NULL);
+    /// FIXME do it back
+    //    glShaderSourceARB(shader, program->size(), (const std::string&)&(*program)[0], NULL);
     glCompileShaderARB(shader);
     // checking on error.
@@ -160,5 +159,5 @@
 }
 
-char* Shader::fileRead(const char* fileName)
+char* Shader::fileRead(const std::string& fileName)
 {
   FILE* fileHandle;
@@ -167,8 +166,8 @@
   int count = 0;
 
-  if (fileName == NULL)
+  if (fileName.empty())
     return NULL;
 
-  fileHandle = fopen(fileName, "rt");
+  fileHandle = fopen(fileName.c_str(), "rt");
 
   if (fileHandle == NULL)
@@ -187,11 +186,11 @@
 
 
-std::vector<char*>* Shader::fileReadArray(const char* fileName)
+std::vector<char*>* Shader::fileReadArray(const std::string& fileName)
 {
   FILE*    stream;           //< The stream we use to read the file.
 
-  if( (stream = fopen (fileName, "rt")) == NULL)
-  {
-    PRINTF(1)("Shader could not open %s\n", fileName);
+  if( (stream = fopen (fileName.c_str(), "rt")) == NULL)
+  {
+    PRINTF(1)("Shader could not open %s\n", fileName.c_str());
     return NULL;
   }
@@ -234,6 +233,5 @@
   if (type == SHADER_VERTEX && this->vertexShader != 0)
   {
-    delete[] this->vertexShaderFile;
-    this->vertexShaderFile = NULL;
+    this->vertexShaderFile = "";
     glDetachObjectARB(this->shaderProgram, this->vertexShader);
     glDeleteObjectARB(this->vertexShader);
@@ -245,6 +243,5 @@
   else if (type == SHADER_FRAGMENT && this->fragmentShader != 0)
   {
-    delete[] this->fragmentShaderFile;
-    this->fragmentShaderFile = NULL;
+    this->fragmentShaderFile = "";
     glDetachObjectARB(this->shaderProgram, this->fragmentShader);
     glDeleteObjectARB(this->fragmentShader);
Index: trunk/src/lib/graphics/shader.h
===================================================================
--- trunk/src/lib/graphics/shader.h	(revision 7199)
+++ trunk/src/lib/graphics/shader.h	(revision 7221)
@@ -27,16 +27,16 @@
 
   public:
-  Shader(const char* vertexShaderFile = NULL, const char* fragmentShaderFile = NULL);
+  Shader(const std::string& vertexShaderFile = "", const std::string& fragmentShaderFile = "");
   virtual ~Shader();
-  static Shader* getShader(const char* vertexShaderFile, const char* fragmentShaderFile);
+  static Shader* getShader(const std::string& vertexShaderFile, const std::string& fragmentShaderFile);
   static bool unload(Shader* shader);
 
-  bool loadShaderProgramm(SHADER_TYPE type, const char* fileName);
+  bool loadShaderProgramm(SHADER_TYPE type, const std::string& fileName);
   void activateShader();
   static void deactivateShader();
   void deleteProgram(SHADER_TYPE type);
 
-  char* fileRead(const char* fileName);
-  std::vector<char*>* fileReadArray(const char* fileName);
+  char* fileRead(const std::string& fileName);
+  std::vector<char*>* fileReadArray(const std::string& fileName);
 
   static bool checkShaderAbility();
@@ -54,6 +54,6 @@
 
  private:
-   char*                  fragmentShaderFile;
-   char*                  vertexShaderFile;
+   std::string            fragmentShaderFile;
+   std::string            vertexShaderFile;
    GLhandleARB            shaderProgram;
    GLhandleARB            vertexShader;
Index: trunk/src/lib/graphics/text_engine/font.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/font.cc	(revision 7199)
+++ trunk/src/lib/graphics/text_engine/font.cc	(revision 7221)
@@ -37,5 +37,5 @@
  * @param fontSize the Size of the Font in Pixels
  */
-Font::Font(const char* fontFile, unsigned int renderSize)
+Font::Font(const std::string& fontFile, unsigned int renderSize)
 {
   this->init();
@@ -44,5 +44,5 @@
   this->setStyle("c");
 
-  if (fontFile != NULL)
+  if (!fontFile.empty())
     this->loadFontFromTTF(fontFile);
 }
@@ -52,5 +52,5 @@
  * @param imageFile the ImageFile to load the Font From.
  */
-Font::Font(const char* imageFile)
+Font::Font(const std::string& imageFile)
 {
   this->init();
@@ -58,6 +58,6 @@
   //  this->setSize(fontSize);
   SDL_Surface* image = NULL;
-  if (imageFile != NULL)
-    image = IMG_Load(imageFile);
+  if (!imageFile.empty())
+    image = IMG_Load(imageFile.c_str());
   else
     return;
@@ -68,5 +68,5 @@
   }
   else
-    PRINTF(1)("loading from surface %s failed: %s\n", imageFile, IMG_GetError());
+    PRINTF(1)("loading from surface %s failed: %s\n", imageFile.c_str(), IMG_GetError());
 }
 
@@ -114,7 +114,7 @@
 
   //! @todo check if we really do not need to delete the fastTextureID here.
-//   if (this->fastTextureID != 0)
-//     if(glIsTexture(this->fastTextureID))
-//       glDeleteTextures(1, &this->fastTextureID);
+  //   if (this->fastTextureID != 0)
+  //     if(glIsTexture(this->fastTextureID))
+  //       glDeleteTextures(1, &this->fastTextureID);
 
   // erease this font out of the memory.
@@ -140,5 +140,5 @@
  * @returns true if loaded, false if something went wrong, or if a font was loaded before.
  */
-bool Font::loadFontFromTTF(const char* fontFile)
+bool Font::loadFontFromTTF(const std::string& fontFile)
 {
   // checking for existent Font.
@@ -222,20 +222,21 @@
  *   i: italic, b: bold, u, underline
  */
-void Font::setStyle(const char* renderStyle)
+void Font::setStyle(const std::string& renderStyle)
 {
   this->renderStyle = TTF_STYLE_NORMAL;
 
-  for (int i = 0; i < strlen(renderStyle); i++)
-    if (strncmp(renderStyle+i, "b", 1) == 0)
+  for (int i = 0; i < renderStyle.size(); i++)
+  {
+    if (renderStyle[i] == 'b')
       this->renderStyle |= TTF_STYLE_BOLD;
-  else if (strncmp(renderStyle+i, "i", 1) == 0)
-    this->renderStyle |= TTF_STYLE_ITALIC;
-  else if (strncmp(renderStyle+i, "u", 1) == 0)
-    this->renderStyle |= TTF_STYLE_UNDERLINE;
-
+    else if (renderStyle[i] == 'i')
+      this->renderStyle |= TTF_STYLE_ITALIC;
+    else if (renderStyle[i] == 'u')
+      this->renderStyle |= TTF_STYLE_UNDERLINE;
+  }
   if (likely(this->fontTTF != NULL))
     TTF_SetFontStyle(this->fontTTF, this->renderStyle);
-//  else
-//    PRINTF(2)("Font was not initialized, please do so before setting the Font-Style.\n");
+  //  else
+  //    PRINTF(2)("Font was not initialized, please do so before setting the Font-Style.\n");
 }
 
@@ -247,5 +248,5 @@
  * @param fileName the File to write the image into.
  */
-void Font::createAsciiImage(const char* fileName, unsigned int size) const
+void Font::createAsciiImage(const std::string& fileName, unsigned int size) const
 {
   if (this->fontTTF == NULL)
@@ -258,16 +259,16 @@
   SDL_Rect tmpRect; // this represents a Rectangle for blitting.
   SDL_Surface* tmpSurf =  SDL_CreateRGBSurface(SDL_SWSURFACE,
-                                               height*size, height*size,
-                                               32,
+                          height*size, height*size,
+                          32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-                                               0x000000FF,
-                                               0x0000FF00,
-                                               0x00FF0000,
-                                               0xFF000000
+                          0x000000FF,
+                          0x0000FF00,
+                          0x00FF0000,
+                          0xFF000000
 #else
-                                               0xFF000000,
-                                               0x00FF0000,
-                                               0x0000FF00,
-                                               0x000000FF
+                          0xFF000000,
+                          0x00FF0000,
+                          0x0000FF00,
+                          0x000000FF
 #endif
                                               );
@@ -299,5 +300,5 @@
     }
   }
-  SDL_SaveBMP(tmpSurf, fileName);
+  SDL_SaveBMP(tmpSurf, fileName.c_str());
   SDL_FreeSurface(tmpSurf);
 }
@@ -409,5 +410,5 @@
 
   this->initGlyphs(32, numberOfGlyphs);
-//  this->glyphArray[32]->width = .5f; //!< @todo find out the real size of a Space
+  //  this->glyphArray[32]->width = .5f; //!< @todo find out the real size of a Space
 
   int rectSize = this->findOptimalFastTextureSize();
@@ -418,16 +419,16 @@
   SDL_Rect tmpRect; // this represents a Rectangle for blitting.
   SDL_Surface* tmpSurf =  SDL_CreateRGBSurface(SDL_SWSURFACE,
-                                               rectSize, rectSize,
-                                               32,
+                          rectSize, rectSize,
+                          32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-                                               0x000000FF,
-                                               0x0000FF00,
-                                               0x00FF0000,
-                                               0xFF000000
+                          0x000000FF,
+                          0x0000FF00,
+                          0x00FF0000,
+                          0xFF000000
 #else
-                                               0xFF000000,
-                                               0x00FF0000,
-                                               0x0000FF00,
-                                               0x000000FF
+                          0xFF000000,
+                          0x00FF0000,
+                          0x0000FF00,
+                          0x000000FF
 #endif
                                               );
@@ -457,5 +458,5 @@
         break;
       }
-          // reading in the new Glyph
+      // reading in the new Glyph
       if (likely(this->fontTTF != NULL))
       {
@@ -521,5 +522,5 @@
   for (int i = from; i <= lastGlyph; i++)
   {
-      // setting up all the Glyphs we like.
+    // setting up all the Glyphs we like.
     glyphArray[i] = getGlyphMetrics(i);
   }
@@ -555,5 +556,5 @@
       if((tmpGlyph = this->glyphArray[i]) != NULL)
       {
-              // getting the height of the highest Glyph in the Line.
+        // getting the height of the highest Glyph in the Line.
         if (tmpGlyph->height*this->renderSize > maxLineHeight)
           maxLineHeight = (int)(tmpGlyph->height*this->renderSize);
@@ -563,5 +564,5 @@
           x = 0;
           y = y + maxLineHeight;
-                  //maxLineHeight = 0;
+          //maxLineHeight = 0;
         }
         if (y + maxLineHeight + 1 > size)
@@ -592,5 +593,6 @@
   if(style==TTF_STYLE_NORMAL)
     PRINTF(0)(" normal");
-  else {
+  else
+  {
     if(style&TTF_STYLE_BOLD)
       PRINTF(0)(" bold");
Index: trunk/src/lib/graphics/text_engine/font.h
===================================================================
--- trunk/src/lib/graphics/text_engine/font.h	(revision 7199)
+++ trunk/src/lib/graphics/text_engine/font.h	(revision 7221)
@@ -55,7 +55,7 @@
 {
   public:
-    Font(const char* fontFile,
+    Font(const std::string& fontFile,
          unsigned int renderSize);
-    Font(const char* imageFile);
+    Font(const std::string& imageFile);
     Font(char** xpmArray);
     virtual ~Font();
@@ -64,8 +64,8 @@
 
   //  font
-    bool loadFontFromTTF(const char* fontFile);
+    bool loadFontFromTTF(const std::string& fontFile);
     bool loadFontFromSDL_Surface(SDL_Surface* surface);
 
-    void setStyle(const char* renderStyle);
+    void setStyle(const std::string& renderStyle);
 
     /** @returns a Pointer to the Array of Glyphs */
@@ -78,5 +78,5 @@
     inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
 
-    void createAsciiImage(const char* fileName, unsigned int size) const;
+    void createAsciiImage(const std::string& fileName, unsigned int size) const;
     static void initDefaultFont();
     static void removeDefaultFont();
Index: trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/text.cc	(revision 7199)
+++ trunk/src/lib/graphics/text_engine/text.cc	(revision 7221)
@@ -32,9 +32,9 @@
  * @param type The renderType to display this font in
  */
-Text::Text(const char* fontFile, unsigned int textSize)
+Text::Text(const std::string& fontFile, unsigned int textSize)
 {
   this->init();
 
-  if (fontFile != NULL)
+  if (!fontFile.empty())
     this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
   this->setSizeY2D(textSize);
@@ -50,7 +50,4 @@
   if (this->font != NULL && this->font != Font::getDefaultFont())
     ResourceManager::getInstance()->unload(this->font);
-
-  if (this->text)
-    delete[] this->text;
 }
 
@@ -64,11 +61,10 @@
   // initialize this Text
   this->font = NULL;
-  this->text = NULL;
-  this->externText = NULL;
+  this->text = "";
   this->setAlignment(TEXT_DEFAULT_ALIGNMENT);
   this->blending = TEXT_DEFAULT_BLENDING;
   this->color = TEXT_DEFAULT_COLOR;
   this->setSize(TEXT_DEFAULT_SIZE);
-  this->setText(NULL);
+  this->setText("");
 }
 
@@ -78,5 +74,5 @@
  * @param fontSize the Size of the Font
  */
-void Text::setFont(const char* fontFile, unsigned int fontSize)
+void Text::setFont(const std::string& fontFile, unsigned int fontSize)
 {
   Font* tmpFont;
@@ -90,5 +86,5 @@
 
   // load a new Font
-  if (fontFile != NULL)
+  if (!fontFile.empty())
   {
     tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, (int)fontSize);
@@ -96,5 +92,5 @@
       this->font = tmpFont;
     else
-      PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
+      PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile.c_str());
   }
 }
@@ -104,29 +100,7 @@
  * @param text the new text to set
  */
-void Text::setText(const char* text, bool isExtern)
-{
-  if (isExtern)
-  {
-    this->externText = text;
-
-    if (unlikely(this->text != NULL))
-    {
-      delete[] this->text;
-      this->text = NULL;
-    }
-  }
-  else
-  {
-    this->externText = NULL;
-    if (this->text)
-      delete[] this->text;
-    if (text != NULL)
-    {
-      this->text = new char[strlen(text)+1];
-      strcpy(this->text, text);
-    }
-    else
-      this->text = NULL;
-  }
+void Text::setText(const std::string& text)
+{
+  this->text = text;
 
   // setting up the Text-Width if DYNAMIC
@@ -138,16 +112,12 @@
 
     float width = 0;
-    const char* tmpText = this->externText;
-    if (this->externText == NULL)
-      tmpText = this->text;
-    if (tmpText != NULL)
+    if (!this->text.empty())
     {
-      while (*tmpText != '\0')
+      for (unsigned int i = 0; i < this->text.size(); i++)
       {
-        if(glyphArray[*tmpText] != NULL)
+        if(glyphArray[this->text[i]] != NULL)
         {
-          width += glyphArray[*tmpText]->advance;
+          width += glyphArray[this->text[i]]->advance;
         }
-        tmpText++;
       }
       this->setSizeX2D(width *this->getSizeY2D());
@@ -190,8 +160,5 @@
     glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getTexture());
   }
-  const char* tmpText = this->externText;
-  if (this->externText == NULL)
-    tmpText = this->text;
-  if (likely(tmpText != NULL))
+  if (likely(!this->text.empty()))
   {
     glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
@@ -201,7 +168,7 @@
 
     glBegin(GL_QUADS);
-    while (likely(*tmpText != '\0'))
+    for (unsigned int i = 0; i < this->text.size(); i++)
     {
-      if(likely((tmpGlyph = glyphArray[*tmpText]) != NULL))
+      if(likely((tmpGlyph = glyphArray[this->text[i]]) != NULL))
       {
         glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
@@ -219,5 +186,4 @@
         posX += tmpGlyph->advance * this->getSizeY2D();
       }
-      ++tmpText;
     }
     glEnd();
@@ -232,8 +198,5 @@
 void Text::debug() const
 {
-  if (this->externText == NULL)
-    PRINT(0)("=== TEXT: %s ===\n", this->text);
-  else
-    PRINT(0)("=== TEXT: %s ===\n", this->externText);
+  PRINT(0)("=== TEXT: %s ===\n", this->text.c_str());
 
   if (this->getBindNode())
Index: trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- trunk/src/lib/graphics/text_engine/text.h	(revision 7199)
+++ trunk/src/lib/graphics/text_engine/text.h	(revision 7221)
@@ -39,14 +39,14 @@
 {
   public:
-    Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE);
+    Text(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE);
     virtual ~Text();
     void init();
 
-    void setFont(const char* fontFile, unsigned int renderSize);
+    void setFont(const std::string& fontFile, unsigned int renderSize);
 
-    void setText(const char* text, bool isExtern = false);
+    void setText(const std::string& text);
 
     /** @returns the String this Text displays */
-    inline const char* getText() const { return (externText == NULL)?this->text:this->externText; };
+    inline const std::string& getText() const { return this->text; };
     /** @param blending the blending intensity to set (between 0.0 and 1.0) */
     inline void setBlending(float blending) { this->blending = blending; };
@@ -69,6 +69,5 @@
     Font*             font;           //!< Font of this text
 
-    char*             text;           //!< The text to display
-    const char*       externText;     //!< the text to Display from an external Source.
+    std::string       text;           //!< The text to display
     Vector            color;          //!< The color of the font.
     float             blending;       //!< The blending intensity.
