Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 6298)
+++ /trunk/src/lib/coord/p_node.cc	(revision 6299)
@@ -34,5 +34,5 @@
  * @brief standard constructor
  * @param parent the Parent of this Node. __NULL__ if __No Parent__ requested, PNode::getNullParent(), if connected to NullParent directly (default)
- * @param nodeFlags all flags to set. THIS_WILL_OVERWRITE Default_Values. look at creation of NullParent for more Info.
+ * @param nodeFlags all flags to set. THIS_WILL_OVERWRITE Default_Values.
  */
 PNode::PNode (PNode* parent, long nodeFlags)
@@ -502,5 +502,5 @@
 /**
  * !! PRIVATE FUNCTION
- * @brief reparents a node (happens on Parents Node delete or remove if Flags are set.)
+ * @brief reparents a node (happens on Parents Node delete or remove and Flags are set.)
  */
 void PNode::reparent()
@@ -514,4 +514,8 @@
 }
 
+/**
+ * ereases child from the nodes children
+ * @param chuld the child to remove
+ */
 void PNode::eraseChild(PNode* child)
 {
Index: /trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 6298)
+++ /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 6299)
@@ -30,13 +30,4 @@
 
 using namespace std;
-
-/**
- * standard constructor
- */
-Element2D::Element2D()
-{
-  this->init();
-  this->setParent2D(NullElement2D::getInstance());
-}
 
 /**
@@ -47,14 +38,36 @@
  * itself. Otherwise it would result in an endless Loop.
  */
-Element2D::Element2D (Element2D* parent, E2D_LAYER layer)
-{
-  this->init();
+Element2D::Element2D (Element2D* parent, E2D_LAYER layer, short nodeFlags)
+{
+  this->setClassID(CL_ELEMENT_2D, "Element2D");
+
+  this->setVisibility(true);
+  this->activate2D();
+  this->setAlignment(E2D_ALIGN_NONE);
+  this->bindNode = NULL;
+
+  this->parentMode = nodeFlags;
+  this->parent = NULL;
+  this->absDirection = 0.0;
+  this->relDirection = 0.0;
+  this->bRelCoorChanged = true;
+  this->bRelDirChanged = true;
+  this->toCoordinate = NULL;
+  this->toDirection = NULL;
+  this->setSize2D(1, 1);
+
+
   this->layer = layer;
-  // check Parenting, and if ok parent the stuff
-  if (this->parent != NULL)
-    this->setParent2D(parent);
-  else if (NullElement2D::isInstanciated())
-    this->setParent2D(NullElement2D::getInstance());
-}
+  if (parent != NULL)
+    parent->addChild2D(this);
+}
+
+
+/**
+ * @brief the mighty NullElement
+ * TopMost Node of them all.
+ */
+Element2D* Element2D::nullElement = NULL;
+
 
 /**
@@ -74,14 +87,28 @@
 Element2D::~Element2D ()
 {
-  // remove the Node, delete it's children.
-  while (this->children.size() > 0)
-  {
-    Element2D* child = this->children.front();
-    this->children.pop_front();
-    delete child;
-  }
+  // remove the Element2D, delete it's children (if required).
+  std::list<Element2D*>::iterator tmp = this->children.begin();
+  std::list<Element2D*>::iterator deleteNode;
+  while(!this->children.empty())
+    while (tmp != this->children.end())
+    {
+      deleteNode = tmp;
+      tmp++;
+//      printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClassName(), this->getName());
+      if ((this->parentMode & E2D_PROHIBIT_CHILD_DELETE) ||
+          ((*deleteNode)->parentMode & E2D_PROHIBIT_DELETE_WITH_PARENT))
+      {
+        if (this == Element2D::nullElement && (*deleteNode)->parentMode & E2D_REPARENT_TO_NULL)
+          delete (*deleteNode);
+        else
+          (*deleteNode)->reparent2D();
+      }
+      else
+        delete (*deleteNode);
+    }
+
   if (this->parent != NULL)
   {
-    this->parent->eraseChild(this);
+    this->parent->eraseChild2D(this);
     this->parent = NULL;
   }
@@ -92,30 +119,9 @@
   if (this->toDirection != NULL)
     delete this->toDirection;
-}
-
-
-/**
- * @brief initializes a Element2D
- */
-void Element2D::init()
-{
-  this->setClassID(CL_ELEMENT_2D, "Element2D");
-
-  this->setVisibility(true);
-  this->setActiveness(true);
-  this->setAlignment(E2D_ALIGN_NONE);
-  this->layer = E2D_DEFAULT_LAYER;
-  this->bindNode = NULL;
-
-  this->setParentMode2D(E2D_PARENT_ALL);
-  this->parent = NULL;
-  this->absDirection = 0.0;
-  this->relDirection = 0.0;
-  this->bRelCoorChanged = true;
-  this->bRelDirChanged = true;
-  this->toCoordinate = NULL;
-  this->toDirection = NULL;
-  this->setSize2D(1,1);
-}
+
+  if (this == Element2D::nullElement)
+    Element2D::nullElement = NULL;
+}
+
 
 /**
@@ -161,5 +167,5 @@
   LOAD_PARAM_START_CYCLE(root, element);
   {
-    LoadParam_CYCLE(element, "parent", this, Element2D, addChild2D)
+    LoadParam_CYCLE(element, "child", this, Element2D, addChild2D)
         .describe("adds a new Child to the current Node.");
   }
@@ -213,5 +219,5 @@
 
 /**
- * sets a node, this 2D-Element should be shown upon
+ * @brief sets a node, this 2D-Element should be shown upon
  * @param bindNode the name of the Node (should be existing)
  */
@@ -511,33 +517,41 @@
   {
     PRINTF(5)("Element2D::addChild() - reparenting node: removing it and adding it again\n");
-    child->parent->eraseChild(child);
-  }
-  child->parent = this;
-  if (likely(this != NULL))
-  {
-    // ELEMENT SORTING TO LAYERS  //
-    unsigned int childCount = this->children.size();
-
-    list<Element2D*>::iterator elem;
-    for (elem = this->children.begin(); elem != this->children.end(); elem++)
-    {
-      if ((*elem)->layer < child->layer)
-      {
-        this->children.insert(elem, child);
-        break;
-      }
-    }
-
-    if (childCount == this->children.size())
-      this->children.push_back(child);
-    ////////////////////////////////
-    if (unlikely(this->layer > child->getLayer()))
-    {
-      PRINTF(2)("Layer '%s' of Child(%s) lower than parents(%s) layer '%s'. updating...\n",
-      Element2D::layer2DToChar(child->getLayer()),child->getName(), this->getName(), Element2D::layer2DToChar(this->layer));
-      child->setLayer(this->layer);
-    }
-  }
-  child->parentCoorChanged();
+    child->parent->eraseChild2D(child);
+  }
+  if (this->checkIntegrity(child))
+  {
+    child->parent = this;
+    if (likely(this != NULL))
+    {
+     // ELEMENT SORTING TO LAYERS  //
+     unsigned int childCount = this->children.size();
+
+     list<Element2D*>::iterator elem;
+     for (elem = this->children.begin(); elem != this->children.end(); elem++)
+     {
+       if ((*elem)->layer < child->layer)
+       {
+         this->children.insert(elem, child);
+         break;
+       }
+     }
+     if (childCount == this->children.size())
+       this->children.push_back(child);
+     ////////////////////////////////
+     if (unlikely(this->layer > child->getLayer()))
+     {
+       PRINTF(2)("Layer '%s' of Child(%s) lower than parents(%s) layer '%s'. updating...\n",
+       Element2D::layer2DToChar(child->getLayer()),child->getName(), this->getName(), Element2D::layer2DToChar(this->layer));
+       child->setLayer(this->layer);
+     }
+   }
+   else
+   {
+     PRINTF(1)("Tried to reparent2D to own child '%s::%s' to '%s::%s'.\n",
+              this->getClassName(), this->getName(), child->getClassName(), child->getName());
+     child->parent = NULL;
+   }
+  }
+  child->parentCoorChanged2D();
 }
 
@@ -566,4 +580,31 @@
 
 /**
+ * !! PRIVATE FUNCTION
+ * @brief reparents an Element2D (happens on Parents Node delete or remove and Flags are set.)
+ */
+void Element2D::reparent2D()
+{
+  if (this->parentMode & E2D_REPARENT_TO_NULL)
+    this->setParent2D((Element2D*)NULL);
+  else if (this->parentMode & E2D_REPARENT_TO_PARENTS_PARENT && this->parent != NULL)
+    this->setParent2D(this->parent->getParent2D());
+  else
+    this->setParent2D(Element2D::getNullElement());
+}
+
+
+/**
+ * @param child the child to be erased from this Nodes List
+ */
+void Element2D::eraseChild2D(Element2D* child)
+{
+  assert (this != NULL && child != NULL);
+  std::list<Element2D*>::iterator childIT = std::find(this->children.begin(), this->children.end(), child);
+  this->children.erase(childIT);
+}
+
+
+
+/**
  * remove this Element from the tree and adds all children to NullElement2D
  *
@@ -572,25 +613,25 @@
 void Element2D::remove2D()
 {
-  list<Element2D*>::iterator child;
-  for (child = this->children.begin(); child != this->children.end(); child++)
-    NullElement2D::getInstance()->addChild2D(*child);
-
-  this->children.clear();
-
+  list<Element2D*>::iterator child = this->children.begin();
+  list<Element2D*>::iterator reparenter;
+  while (child != this->children.end())
+  {
+    reparenter = child;
+    child++;
+    if (this->parentMode & E2D_REPARENT_CHILDREN_ON_REMOVE ||
+        (*reparenter)->parentMode & E2D_REPARENT_ON_PARENTS_REMOVE)
+    {
+      printf("TEST----------------%s ---- %s\n", this->getClassName(), (*reparenter)->getClassName());
+      (*reparenter)->reparent2D();
+      printf("REPARENTED TO: %s::%s\n",(*reparenter)->getParent2D()->getClassName(),(*reparenter)->getParent2D()->getName());
+    }
+  }
   if (this->parent != NULL)
   {
-    this->parent->eraseChild(this);
+    this->parent->eraseChild2D(this);
     this->parent = NULL;
   }
 }
 
-/**
- * sets the parent of this Element2D
- * @param parent the Parent to set
- */
-void Element2D::setParent2D (Element2D* parent)
-{
-  parent->addChild2D(this);
-}
 
 /**
@@ -603,5 +644,7 @@
   if (parentNode != NULL)
     parentNode->addChild2D(this);
-
+  else
+    PRINTF(2)("Not Found Element2D's (%s::%s) new Parent by Name: %s\n",
+                this->getClassName(), this->getName(), parentName);
 }
 
@@ -634,5 +677,5 @@
   parentNode->addChild2D(this);
 
-  if (this->parentMode & PNODE_ROTATE_MOVEMENT) //! @todo implement this.
+  if (this->parentMode & E2D_PARENT_ROTATE_MOVEMENT) //! @todo implement this.
     ;//this->setRelCoor(this->parent->getAbsDir().inverse().apply(tmpV - this->parent->getAbsCoor()));
   else
@@ -656,11 +699,12 @@
 }
 
-/** @param child the child to be erased from this Nodes List */
-void Element2D::eraseChild(Element2D* child)
-{
-  assert (this != NULL && child != NULL);
-  std::list<Element2D*>::iterator childIT = std::find(this->children.begin(), this->children.end(), child);
-  this->children.erase(childIT);
-}
+/**
+ * @param parentMode sets the parentingMode of this Node
+ */
+void Element2D::setParentMode2D(E2D_PARENT_MODE parentMode)
+{
+  this->parentMode &= (0xfff0 | parentMode);
+}
+
 
 /**
@@ -672,4 +716,38 @@
   this->setParentMode2D(Element2D::charToParentingMode2D(parentingMode));
 }
+
+
+/**
+ * @returns the NullElement (and if needed (most probably) creates it)
+ */
+Element2D* Element2D::createNullElement()
+{
+  if (likely(Element2D::nullElement == NULL))
+  {
+    Element2D::nullElement = new Element2D(NULL, E2D_LAYER_BELOW_ALL, E2D_PARENT_MODE_DEFAULT | E2D_REPARENT_TO_NULL);
+    Element2D::nullElement->setName("NullElement");
+  }
+  return Element2D::nullElement;
+}
+
+
+/**
+ * !! PRIVATE FUNCTION
+ * @brief checks the upward integrity (e.g if Element2D is somewhere up the Node tree.)
+ * @param checkParent the Parent to check.
+ * @returns true if the integrity-check succeeds, false otherwise.
+ *
+ * If there is a second occurence of checkParent before NULL, then a loop could get
+ * into the Tree, and we do not want this.
+ */
+bool Element2D::checkIntegrity(const Element2D* checkParent) const
+{
+  const Element2D* parent = this;
+  while ( (parent = parent->getParent2D()) != NULL)
+    if (unlikely(parent == checkParent))
+      return false;
+  return true;
+}
+
 
 /**
@@ -796,5 +874,5 @@
 
   // UPDATE CHILDREN
-  if(this->children.size() > 0)
+  if(!this->children.empty() || this->parentMode & E2D_UPDATE_CHILDREN_IF_INACTIVE)
   {
     list<Element2D*>::iterator child;
@@ -803,7 +881,7 @@
       /* if this node has changed, make sure, that all children are updated also */
       if( likely(this->bRelCoorChanged))
-        (*child)->parentCoorChanged ();
+        (*child)->parentCoorChanged2D();
       if( likely(this->bRelDirChanged))
-        (*child)->parentDirChanged ();
+        (*child)->parentDirChanged2D();
 
       (*child)->update2D(dt);
@@ -816,4 +894,5 @@
   this->bRelDirChanged = false;
 }
+
 
 /**
@@ -865,5 +944,5 @@
 void Element2D::tick2D(float dt)
 {
-  if (this->active)
+  if (this->bActive)
     this->tick(dt);
   if (this->children.size() > 0)
@@ -881,5 +960,5 @@
 void Element2D::draw2D(short layer) const
 {
-  if (this->visible)
+  if (this->bVisible)
     this->draw();
   if (this->children.size() > 0)
@@ -930,5 +1009,5 @@
     {
       // drawing the Dependency graph
-      if (this != NullElement2D::getInstance())
+      if (this != Element2D::getNullElement())
       {
         glBegin(GL_LINES);
@@ -1039,31 +1118,2 @@
     return (E2D_DEFAULT_LAYER);
 }
-
-
-
-
-///////////////////
-// NullElement2D //
-///////////////////
-NullElement2D* NullElement2D::singletonRef = 0;
-
-/**
- * @brief creates the one and only NullElement2D
- */
-NullElement2D::NullElement2D () : Element2D(NULL, E2D_LAYER_BELOW_ALL)
-{
-  this->setClassID(CL_NULL_ELEMENT_2D, "NullElement2D");
-  this->setName("NullElement2D");
-
-  this->setParentMode2D(E2D_PARENT_ALL);
-  NullElement2D::singletonRef = this;
-}
-
-
-/**
- *  standard deconstructor
- */
-NullElement2D::~NullElement2D ()
-{
-  NullElement2D::singletonRef = NULL;
-}
Index: /trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.h	(revision 6298)
+++ /trunk/src/lib/graphics/render2D/element_2d.h	(revision 6299)
@@ -1,5 +1,5 @@
 /*!
  * @file element_2d.h
- * Definition of the 2D elements rendered on top through the GraphicsEngine
+ * Definition of the 2D elements rendered on top of all other stuff.
  */
 
@@ -40,22 +40,38 @@
 typedef enum
 {
-  E2D_PARENT_NONE               =   0,
-  E2D_PARENT_LOCAL_ROTATE       =   1,    //!< Rotates all the children around their centers.
-  E2D_PARENT_ROTATE_MOVEMENT    =   2,    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
-
-  E2D_PARENT_MOVEMENT           =   4,    //!< Moves all children along with the parent.
+  E2D_PARENT_NONE                    = 0x0000,
+  E2D_PARENT_LOCAL_ROTATE            = 0x0001,    //!< Rotates all the children around their centers.
+  E2D_PARENT_ROTATE_MOVEMENT         = 0x0002,    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
+
+  E2D_PARENT_MOVEMENT                = 0x0004,    //!< Moves all children along with the parent.
 // special linkage modes
-  E2D_PARENT_ALL                =   3,    //!< Moves all children around the center of their parent, and also rotates their centers
-  E2D_PARENT_ROTATE_AND_MOVE    =   5     //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent.
+  E2D_PARENT_ALL                     = 0x0003,    //!< Moves all children around the center of their parent, and also rotates their centers
+  E2D_PARENT_ROTATE_AND_MOVE         = 0x0005,    //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent.
+
+
+  // REPARENTING
+  E2D_REPARENT_TO_NULL               = 0x0010,    //!< Reparents to the Null, if the Parent is Removed. Meaning the Node wont have a parent anymore.
+  E2D_REPARENT_TO_PARENTS_PARENT     = 0x0020,    //!< Reparents the Node to the parents (old) parent it the parent gets removed.
+  /////////////////////////////////////////////   //  ELSE: Reparents to the NullParent.
+  E2D_REPARENT_DELETE_CHILDREN       = 0x0040,    //!< Deletes the Children of the node when This Node is Removed. (Use with care).
+  /// FIXME
+   E2D_REPARENT_KEEP_POSITION         = 0x0080,   //!< Tries to keep the Position if the Node is reparented.
+
+
+  // DELETION
+  E2D_PROHIBIT_CHILD_DELETE          = 0x0100,    //!< Prohibits the Children from being deleted if this Node gets deleted.
+  E2D_PROHIBIT_DELETE_WITH_PARENT    = 0x0200,    //!< Prohibits the Node to be deleted if the Parent is. Child will be reparented according to the Repaenting-Rules
+  E2D_REPARENT_CHILDREN_ON_REMOVE    = 0x0400,    //!< Reparents the Children of the Node if the Node gets Removed.
+  E2D_REPARENT_ON_PARENTS_REMOVE     = 0x0800,    //!< The Node gets Reparented if its Parent gets removed. Child will be reparented according to the Reparenting-Rules.
+
+  // VISIBILITY/ACTIVITY
+  E2D_HIDE_CHILDREN_IF_HIDDEN        = 0x1000,    //!< Prohibits the Children from being drawn if this node isn't visible. (used for Draw))
+  E2D_HIDE_IF_PARENT_HIDDEN          = 0x2000,    //!< Prohibits the node from being drawn if the Parent is invisible.
+  E2D_UPDATE_CHILDREN_IF_INACTIVE    = 0x4000,    //!< Updates the Children of this Node even if the Parent is Inactive (note if this's parent is inactive children won't be updated.)
+  E2D_STATIC_NODE                    = 0x8000,    //!< Used for nodes that do not have any moving children, and that do not move.
+
 } E2D_PARENT_MODE;
-#define     E2D_DEFAULT_PARENTING_MODE  E2D_PARENT_ALL
-
-//! A Struct defining the Position of an Element in 2D-space
-struct Position2D
-{
-  float       x;                 //!< The x-coordinate.
-  float       y;                 //!< The y-coordinate.
-  float       depth;             //!< The distance from the viewing plane.
-};
+#define     E2D_PARENT_MODE_DEFAULT     E2D_PARENT_ALL | \
+					E2D_REPARENT_KEEP_POSITION
 
 //! A class for 2D-elements
@@ -72,11 +88,15 @@
 
   public:
-    Element2D();
-    Element2D(Element2D* parent, E2D_LAYER layer = E2D_DEFAULT_LAYER);
+    Element2D(Element2D* parent = Element2D::getNullElement(), E2D_LAYER layer = E2D_DEFAULT_LAYER, short nodeFlags = E2D_PARENT_MODE_DEFAULT);
     virtual ~Element2D();
 
-    void init();
     void loadParams(const TiXmlElement* root);
 
+    // ACTIVATION //
+    inline void activate2D() { this->bActive = this->bRelCoorChanged = this->bRelDirChanged = true; };
+    inline void deactivate2D() { this->bActive = false; };
+    inline bool get2DActiveState() { return this->bActive; };
+
+    // ALIGNMENT //
     /** @param alignment the new Alignment of the 2D-Element */
     inline void setAlignment(E2D_ALIGNMENT alignment) { this->alignment = alignment; };
@@ -84,4 +104,5 @@
     inline E2D_ALIGNMENT getAlignment() const { return this->alignment; };
 
+    // LAYERING //
     void setLayer(E2D_LAYER layer);
     void setLayer(const char* layer);
@@ -89,20 +110,16 @@
     inline E2D_LAYER getLayer() const { return this->layer; };
 
+    // VISIBILITY //
     /** @param visible true if the Element should be visible false otherwise (will not be rendered) */
-    inline void setVisibility(bool visible) { this->visible = visible; };
-    /** @param active true if the Element should be active, false otherwise (will not be ticked) */
-    inline void setActiveness(bool active) { this->active = active; };
-
-
+    inline void setVisibility(bool visible) { this->bVisible = visible; };
+    /** @returns the visibility state */
+    inline bool isVisible() { return this->bVisible; };
+
+
+    // POSITIONAL (E2D-specials) //
     /** @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);
     inline const PNode* getBindNode() const { return this->bindNode; };
-
-    /** @returns the visibility state */
-    inline bool isVisible() { return this->visible; };
-    /** @returns the active-State */
-    inline bool isActive() { return this->active; };
-
 
     inline void setSize2D(float x, float y) { this->sizeX = x, this->sizeY = y; };
@@ -114,5 +131,5 @@
   public:
     virtual void tick(float dt) {};
-    virtual void draw() const = 0;
+    virtual void draw() const  {};
     void tick2D(float dt);
     void draw2D(short layer) const;
@@ -166,5 +183,6 @@
     void remove2D();
 
-    void setParent2D (Element2D* parent);
+    /** @param parent the new parent of this Element2D */
+    void setParent2D (Element2D* parent) { parent->addChild2D(this); };
     void setParent2D (const char* parentName);
     /** @returns the parent of this Element2D */
@@ -176,10 +194,14 @@
     void setParentSoft2D(const char* parentName, float bias = 1.0);
 
-    /** @param parentMode sets the parentingMode of this Node */
-    void setParentMode2D (E2D_PARENT_MODE parentMode) { this->parentMode = parentMode; };
+    void setParentMode2D (E2D_PARENT_MODE parentMode);
     void setParentMode2D (const char* parentingMode);
     /** @returns the Parenting mode of this node */
     int getParentMode2D() const { return this->parentMode; };
 
+    // NULL_PARENT //
+    /** @returns the NullParent, the (main) ROOT of the PNode Tree. If it does not yet exist, it will be created. */
+    static Element2D* getNullElement()  { return (Element2D::nullElement != NULL)? Element2D::nullElement : Element2D::createNullElement(); };
+
+
     void update2D (float dt);
 
@@ -195,12 +217,15 @@
 
   private:
-    void eraseChild(Element2D* child);
+    void eraseChild2D(Element2D* child);
     /** tells the child that the parent's Coordinate has changed */
-    inline void parentCoorChanged () { this->bRelCoorChanged = true; }
+    inline void parentCoorChanged2D () { this->bRelCoorChanged = true; }
     /** tells the child that the parent's Direction has changed */
-    inline void parentDirChanged () { this->bRelDirChanged = true; }
+    inline void parentDirChanged2D () { this->bRelDirChanged = true; }
     /** @returns the last calculated coordinate */
-    inline Vector getLastAbsCoor() { return this->lastAbsCoordinate; }
-
+    inline Vector getLastAbsCoor2D() { return this->lastAbsCoordinate; }
+
+    void reparent2D();
+    static Element2D* createNullElement();
+    bool checkIntegrity(const Element2D* checkParent) const;
 
 
@@ -212,6 +237,6 @@
     E2D_ALIGNMENT           alignment;          //!< How the Element is aligned around its Position
 
-    bool                    visible;            //!< If the given Element2D is visible.
-    bool                    active;             //!< If the given Element2D is active.
+    bool                    bVisible;            //!< If the given Element2D is visible.
+    bool                    bActive;             //!< If the given Element2D is active.
     E2D_LAYER               layer;              //!< What layer this Element2D is on.
 
@@ -238,23 +263,7 @@
 
     unsigned int            parentMode;         //!< the mode of the binding
+
+    static Element2D*       nullElement;        //!< The top-most Element
 };
 
-//! The top joint of all Element2D's every Element2D is somehow connected to this one.
-class NullElement2D : public Element2D {
-
-  public:
-    /** @returns a Pointer to the only object of this Class */
-    inline static NullElement2D* getInstance() { if (!NullElement2D::singletonRef) NullElement2D::singletonRef = new NullElement2D();  return NullElement2D::singletonRef; };
-    inline static bool isInstanciated() { return (NullElement2D::singletonRef != NULL)?true:false; };
-    virtual ~NullElement2D ();
-
-  private:
-    NullElement2D ();
-    virtual void draw() const {};
-
-  private:
-    static NullElement2D* singletonRef;        //!< A reference to the NullElement2D
-
-};
-
 #endif /* _ELEMENT_2D_H */
Index: /trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/render_2d.cc	(revision 6298)
+++ /trunk/src/lib/graphics/render2D/render_2d.cc	(revision 6299)
@@ -50,5 +50,5 @@
 Render2D::~Render2D ()
 {
-  delete NullElement2D::getInstance();
+  delete Element2D::getNullElement();
 
   Render2D::singletonRef = NULL;
@@ -61,5 +61,5 @@
 void Render2D::update(float dt)
 {
-  NullElement2D::getInstance()->update2D(dt);
+  Element2D::getNullElement()->update2D(dt);
 }
 
@@ -71,5 +71,5 @@
 void Render2D::tick(float dt)
 {
-  NullElement2D::getInstance()->tick2D(dt);
+  Element2D::getNullElement()->tick2D(dt);
 }
 
@@ -81,7 +81,7 @@
 {
   GraphicsEngine::enter2DMode();
-  NullElement2D::getInstance()->draw2D(E2D_LAYER_ALL);
+  Element2D::getNullElement()->draw2D(E2D_LAYER_ALL);
   if (this->showNodes)
-    NullElement2D::getInstance()->debugDraw2D(0);
+    Element2D::getNullElement()->debugDraw2D(0);
   GraphicsEngine::leave2DMode();
 }
