Index: trunk/src/defs/class_id.h
===================================================================
--- trunk/src/defs/class_id.h	(revision 5205)
+++ trunk/src/defs/class_id.h	(revision 5206)
@@ -81,5 +81,5 @@
   CL_WEAPON                     =    0x00120000,
 
-  // subsuper-classes derivations taken : 1, a.     << THIS IS A LIST OF ALL THE DCL_MASK_SUBSUPERCLASS_ID's taken
+  // subsuper-classes derivations taken : 1, a, b.     << THIS IS A LIST OF ALL THE DCL_MASK_SUBSUPERCLASS_ID's taken
 
   // lowest level classes
@@ -110,5 +110,4 @@
   CL_RENDER_2D                  =    0x00000f21,
   CL_NULL_ELEMENT_2D            =    0x00000f22,
-  CL_SHELL                      =    0x00000f31,
   CL_SHELL_BUFFER               =    0x00000f32,
 
@@ -160,5 +159,5 @@
 
   // graphical stuff (range from 0x00000800 to 0x000009ff)
-  CL_TEXT                       =    0x00000801,
+  CL_TEXT                       =    0x00b01801,
   CL_FONT                       =    0x00000802,
   CL_MATERIAL                   =    0x00000803,
@@ -195,4 +194,5 @@
   CL_NUMBER                     =    0x00000b0c,
   CL_FAST_FACTORY               =    0x00000c01,
+  CL_SHELL                      =    0x00000c10,
   CL_SHELL_COMMAND              =    0x00000c11,
   CL_SHELL_COMMAND_CLASS        =    0x00000c12,
Index: trunk/src/lib/shell/shell.cc
===================================================================
--- trunk/src/lib/shell/shell.cc	(revision 5205)
+++ trunk/src/lib/shell/shell.cc	(revision 5206)
@@ -50,4 +50,8 @@
   this->setName("Shell");
 
+  // register the shell at the ShellBuffer
+  ShellBuffer::getInstance()->registerShell(this);
+
+
   // Element2D and generals
   this->setAbsCoor2D(3, -400);
@@ -71,6 +75,4 @@
 }
 
-Shell* Shell::singletonRef = NULL;
-
 /**
  * standard deconstructor
@@ -85,6 +87,5 @@
   // delete the inputLine
   delete this->shellInput;
-
-  Shell::singletonRef = NULL;
+  ShellBuffer::getInstance()->unregisterShell(this);
 }
 
@@ -198,7 +199,5 @@
       this->bufferText[i]->setText(NULL, true);
     }
-
-
-    // BUFFER FLUSHING
+  // BUFFER FLUSHING
 }
 
@@ -240,6 +239,4 @@
 }
 
-
-
 /**
  * listens for some event
@@ -322,6 +319,4 @@
 }
 
-
-
 // void Shell::testI (int i)
 // {
Index: trunk/src/lib/shell/shell.h
===================================================================
--- trunk/src/lib/shell/shell.h	(revision 5205)
+++ trunk/src/lib/shell/shell.h	(revision 5206)
@@ -36,9 +36,6 @@
 
   public:
+    Shell();
     virtual ~Shell();
-    /** @returns a Pointer to the only object of this Class */
-    inline static Shell* getInstance() { if (!Shell::singletonRef) Shell::singletonRef = new Shell();  return Shell::singletonRef; };
-    /** @returns true if this class is instanciated, false otherwise */
-    inline static bool isInstanciated() { return (Shell::singletonRef == NULL)?false:true; };
 
     void activate();
@@ -75,6 +72,4 @@
 
   private:
-    Shell();
-    static Shell*            singletonRef;           //!< The singleton-reference to the only memeber of this class.
 
     // GENERAL
Index: trunk/src/lib/shell/shell_buffer.cc
===================================================================
--- trunk/src/lib/shell/shell_buffer.cc	(revision 5205)
+++ trunk/src/lib/shell/shell_buffer.cc	(revision 5206)
@@ -33,4 +33,5 @@
 {
   ShellBuffer::singletonRef = this;
+  this->shell = NULL;
 
   this->lineCount = 0;
@@ -50,6 +51,6 @@
 ShellBuffer::~ShellBuffer ()
 {
-  if (Shell::isInstanciated())
-    delete Shell::getInstance();
+  if (this->shell != NULL)
+    delete this->shell;
 
   this->flushBuffers();
@@ -58,4 +59,28 @@
 
   ShellBuffer::singletonRef = NULL;
+}
+
+/**
+ * registers the Shell to the Buffer
+ * @param shell the Shell to register.
+ */
+void ShellBuffer::registerShell(Shell* shell)
+{
+  if (this->shell == NULL)
+    this->shell = shell;
+  else
+    PRINTF(1)("already registered a Shell to the ShellBuffer\n");
+}
+
+/**
+ * unregisters the Shell from the Buffer
+ * @param shell the Shell to unregister.
+ */
+void ShellBuffer::unregisterShell(Shell* shell)
+{
+  if (this->shell == shell)
+    this->shell = NULL;
+  else
+    PRINTF(1)("cannot unregister shell, because it is not registered to the ShellBuffer\n");
 }
 
@@ -150,6 +175,6 @@
     this->lineCount++;
     this->buffer->add(addLine);
-    if (Shell::isInstanciated() && Shell::getInstance()->isActive())
-      Shell::getInstance()->printToDisplayBuffer(addLine);
+    if (likely (this->shell != NULL) && unlikely (this->shell->isActive()))
+      this->shell->printToDisplayBuffer(addLine);
 
     if (this->buffer->getSize() > this->bufferSize)
Index: trunk/src/lib/shell/shell_buffer.h
===================================================================
--- trunk/src/lib/shell/shell_buffer.h	(revision 5205)
+++ trunk/src/lib/shell/shell_buffer.h	(revision 5206)
@@ -12,4 +12,5 @@
 
 // FORWARD DECLARATION
+class Shell;
 template<class T> class tList;
 template<class T> class tIterator;
@@ -27,4 +28,7 @@
   /** @returns true if this class is instanciated, false otherwise */
   inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; };
+
+  void registerShell(Shell* shell);
+  void unregisterShell(Shell* shell);
 
   // BUFFER //
@@ -54,4 +58,5 @@
    tIterator<char>*         bufferIterator;                     //!< An iterator for the Shells main buffer.
 
+   Shell*                   shell;                              //!< the Registered Shell.
    char                     bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
    char                     keepBufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER to have multi-non-newLine commands be copied into the shell.
Index: trunk/src/story_entities/world.cc
===================================================================
--- trunk/src/story_entities/world.cc	(revision 5205)
+++ trunk/src/story_entities/world.cc	(revision 5206)
@@ -119,5 +119,5 @@
 World::~World ()
 {
-  delete Shell::getInstance();
+  delete this->shell;
   PRINTF(3)("World::~World() - deleting current world\n");
 
@@ -200,5 +200,5 @@
 
   /* init the world interface */
-  Shell::getInstance();
+  this->shell = new Shell();
 
   LightManager::getInstance();
Index: trunk/src/story_entities/world.h
===================================================================
--- trunk/src/story_entities/world.h	(revision 5205)
+++ trunk/src/story_entities/world.h	(revision 5206)
@@ -24,4 +24,5 @@
 class PilotNode;
 
+class Shell;
 class OggPlayer;
 
@@ -93,5 +94,5 @@
   char* path;                         //!< The file from which this world is loaded
 
-
+  Shell*     shell;
   OggPlayer* music;
 
