Index: code/branches/console/src/core/InputBuffer.cc
===================================================================
--- code/branches/console/src/core/InputBuffer.cc	(revision 1316)
+++ code/branches/console/src/core/InputBuffer.cc	(revision 1317)
@@ -46,4 +46,6 @@
         this->buffer_ = "";
         this->cursor_ = 0;
+
+        InputManager::getSingleton().feedInputBuffer(this);
     }
 
@@ -54,4 +56,6 @@
         this->buffer_ = "";
         this->cursor_ = 0;
+
+        InputManager::getSingleton().feedInputBuffer(this);
     }
 
Index: code/branches/console/src/core/Shell.cc
===================================================================
--- code/branches/console/src/core/Shell.cc	(revision 1316)
+++ code/branches/console/src/core/Shell.cc	(revision 1317)
@@ -48,5 +48,5 @@
 
         this->clearLines();
-
+/*
         this->inputBuffer_.registerListener(this, &Shell::inputChanged, true);
         this->inputBuffer_.registerListener(this, &Shell::execute, '\r', false);
@@ -63,5 +63,5 @@
         this->inputBuffer_.registerListener(this, &Shell::scroll_up, OIS::KC_PGUP);
         this->inputBuffer_.registerListener(this, &Shell::scroll_down, OIS::KC_PGDOWN);
-
+*/
         this->setConfigValues();
     }
@@ -141,7 +141,14 @@
     {
         if (this->scrollPosition_)
+        {
             return this->scrollIterator_;
+        }
         else
-            return this->lines_.begin();
+        {
+            if ((*this->lines_.begin()) == "" && this->lines_.size() > 1)
+                return (++this->lines_.begin());
+            else
+                return this->lines_.begin();
+        }
     }
 
@@ -169,5 +176,12 @@
         while (this->outputBuffer_.getLine(&output))
         {
+            bool newline = false;
+            if ((*this->lines_.begin()) == "")
+                newline = true;
+
             (*this->lines_.begin()) += output;
+
+            SHELL_UPDATE_LISTENERS(onlyLastLineChanged);
+
             this->lines_.insert(this->lines_.begin(), "");
 
@@ -177,6 +191,8 @@
                 this->scrollIterator_ = this->lines_.begin();
 
-            SHELL_UPDATE_LISTENERS(linesChanged);
-            SHELL_UPDATE_LISTENERS(lineAdded);
+            if (newline)
+            {
+                SHELL_UPDATE_LISTENERS(lineAdded);
+            }
         }
 
Index: code/branches/console/src/core/Shell.h
===================================================================
--- code/branches/console/src/core/Shell.h	(revision 1316)
+++ code/branches/console/src/core/Shell.h	(revision 1317)
@@ -79,6 +79,6 @@
                 { return this->inputBuffer_.get(); }
 
-            inline std::list<std::string>::const_iterator getNewestLineIterator() const;
-            inline std::list<std::string>::const_iterator getEndIterator() const;
+            std::list<std::string>::const_iterator getNewestLineIterator() const;
+            std::list<std::string>::const_iterator getEndIterator() const;
 
             void addLine(const std::string& line, unsigned int level);
Index: code/branches/console/src/orxonox/Orxonox.cc
===================================================================
--- code/branches/console/src/orxonox/Orxonox.cc	(revision 1316)
+++ code/branches/console/src/orxonox/Orxonox.cc	(revision 1317)
@@ -76,5 +76,5 @@
 #include "tools/Timer.h"
 #include "hud/HUD.h"
-#include "console/InGameConsole.h"
+//#include "console/InGameConsole.h"
 
 // FIXME: is this really file scope?
@@ -88,5 +88,5 @@
   ConsoleCommand(Orxonox, slomo, AccessLevel::Offline, true).setDefaultValue(0, 1.0);
   ConsoleCommand(Orxonox, setTimeFactor, AccessLevel::Offline, false).setDefaultValue(0, 1.0);
-
+/*
   class Testconsole : public InputBufferListener
   {
@@ -125,5 +125,5 @@
       InputBuffer* ib_;
   };
-
+*/
   class Calculator
   {
@@ -421,6 +421,7 @@
   void Orxonox::startRenderLoop()
   {
-    InputBuffer* ib = new InputBuffer();
-    InputManager::getSingleton().feedInputBuffer(ib);
+
+//    InputBuffer* ib = new InputBuffer();
+//    InputManager::getSingleton().feedInputBuffer(ib);
     /*
     Testconsole* console = new Testconsole(ib);
@@ -432,5 +433,5 @@
     ib->registerListener(console, &Testconsole::exit, (char)0x1B, true);
     */
-
+    /*
     orxonoxConsole_ = new InGameConsole(ib);
     ib->registerListener(orxonoxConsole_, &InGameConsole::listen, true);
@@ -440,5 +441,5 @@
     ib->registerListener(orxonoxConsole_, &InGameConsole::removeLast, '\b', true);
     ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true);
-
+    */
     // first check whether ogre root object has been created
     if (Ogre::Root::getSingletonPtr() == 0)
@@ -489,5 +490,5 @@
       for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
         it->tick((float)evt.timeSinceLastFrame * this->timefactor_);
-      orxonoxConsole_->tick((float)evt.timeSinceLastFrame * this->timefactor_);
+//      orxonoxConsole_->tick((float)evt.timeSinceLastFrame * this->timefactor_);
 
       // don't forget to call _fireFrameStarted in ogre to make sure
Index: code/branches/console/src/orxonox/Orxonox.h
===================================================================
--- code/branches/console/src/orxonox/Orxonox.h	(revision 1316)
+++ code/branches/console/src/orxonox/Orxonox.h	(revision 1317)
@@ -105,5 +105,5 @@
       // TODO: make this a config-value by creating a config class for orxonox
       float                 frameSmoothingTime_;
-      InGameConsole*        orxonoxConsole_;
+//      InGameConsole*        orxonoxConsole_;
       HUD*                  orxonoxHUD_;
       bool                  bAbort_;        //!< aborts the render loop if true
Index: code/branches/console/src/orxonox/console/InGameConsole.cc
===================================================================
--- code/branches/console/src/orxonox/console/InGameConsole.cc	(revision 1316)
+++ code/branches/console/src/orxonox/console/InGameConsole.cc	(revision 1317)
@@ -23,5 +23,5 @@
  *      Felix Schulthess
  *   Co-authors:
- *      ...
+ *      Fabian 'x3n' Landau
  *
  */
@@ -40,4 +40,5 @@
 #include "core/Debug.h"
 #include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
 #include "core/ConsoleCommand.h"
 #include "GraphicsEngine.h"
@@ -49,118 +50,181 @@
     using namespace Ogre;
 
-    const float REL_WIDTH = 0.8;
-    const float REL_HEIGHT = 0.4;
-    const float BLINK = 0.25;
-
-    InGameConsole::InGameConsole(InputBuffer* ib){
-        //RegisterObject(InGameConsole);
-        ib_ = ib;
-        active = false;
-        cursor = 0.0;
-        init();
-    }
-
-    InGameConsole::~InGameConsole(void){
-        for(int i=0; i<LINES; i++) delete consoleOverlayTextAreas[i];
-        delete consoleOverlayTextAreas;
-    }
-
-    void InGameConsole::listen(){
-        if(!active) activate();
-        print(convert2UTF(this->ib_->get()));
-    }
-
-    void InGameConsole::execute(){
-        newline();
-        if (!CommandExecutor::execute(this->ib_->get())){
-            print("Error");
-            newline();
-        }
-        this->ib_->clear();
-    }
-
-    void InGameConsole::hintandcomplete(){
-        print(CommandExecutor::hint(this->ib_->get()));
-        newline();
-        this->ib_->set(CommandExecutor::complete(this->ib_->get()));
-        print(convert2UTF(this->ib_->get()));
-    }
-
-    void InGameConsole::clear(){
-        this->ib_->clear();
-    }
-
-    void InGameConsole::removeLast(){
-        this->ib_->removeBehindCursor();
-    }
-
-    void InGameConsole::exit(){
-        clear();
-        deactivate();
-        CommandExecutor::execute("setInputMode 2");
-    }
-
-    /**
-    @brief called once by constructor
-    */
-    void InGameConsole::init(){
+    float InGameConsole::REL_WIDTH = 0.8;
+    float InGameConsole::REL_HEIGHT = 0.4;
+    float InGameConsole::BLINK = 0.25;
+
+    /**
+        @brief Constructor: Creates and initializes the InGameConsole.
+    */
+    InGameConsole::InGameConsole()
+    {
+        RegisterObject(InGameConsole);
+
+        this->active_ = false;
+        this->cursor_ = 0.0;
+
+        this->init();
+        this->setConfigValues();
+    }
+
+    /**
+        @brief Destructor: Destroys the TextAreas.
+    */
+    InGameConsole::~InGameConsole(void)
+    {
+        for (int i = 0; i < LINES; i++)
+            delete this->consoleOverlayTextAreas_[i];
+
+        delete this->consoleOverlayTextAreas_;
+    }
+
+    /**
+        @brief Returns a reference to the only existing instance of InGameConsole.
+    */
+    InGameConsole& InGameConsole::getInstance()
+    {
+        static InGameConsole instance;
+        return instance;
+    }
+
+    /**
+        @brief Sets the config values, describing the size of the console.
+    */
+    void InGameConsole::setConfigValues()
+    {
+        SetConfigValue(REL_WIDTH, 0.8);
+        SetConfigValue(REL_HEIGHT, 0.4);
+        SetConfigValue(BLINK, 0.25);
+    }
+
+    /**
+        @brief Called if all output-lines have to be redrawn.
+    */
+    void InGameConsole::linesChanged()
+    {
+        std::list<std::string>::const_iterator it = Shell::getInstance().getNewestLineIterator();
+        for (int i = 1; i < LINES && it != Shell::getInstance().getEndIterator(); i++)
+        {
+            this->consoleOverlayTextAreas_[i]->setCaption(*it);
+            ++it;
+        }
+    }
+
+    /**
+        @brief Called if only the last output-line has changed.
+    */
+    void InGameConsole::onlyLastLineChanged()
+    {
+        if (LINES > 1)
+            this->consoleOverlayTextAreas_[1]->setCaption(*Shell::getInstance().getNewestLineIterator());
+    }
+
+    /**
+        @brief Called if a new output-line was added.
+    */
+    void InGameConsole::lineAdded()
+    {
+        for (int i = LINES - 1; i > 1; i--)
+            this->consoleOverlayTextAreas_[i]->setCaption(this->consoleOverlayTextAreas_[i - 1]->getCaption());
+
+        if (LINES > 1)
+            this->consoleOverlayTextAreas_[1]->setCaption(*Shell::getInstance().getNewestLineIterator());
+    }
+
+    /**
+        @brief Called if the text in the input-line has changed.
+    */
+    void InGameConsole::inputChanged()
+    {
+        if (LINES > 0)
+            this->consoleOverlayTextAreas_[0]->setCaption(Shell::getInstance().getInput());
+    }
+
+    /**
+        @brief Called if the position of the cursor in the input-line has changed.
+    */
+    void InGameConsole::cursorChanged()
+    {
+        std::string input = Shell::getInstance().getInput();
+        input.insert(Shell::getInstance().getCursorPosition(), 1, '|');
+        if (LINES > 0)
+            this->consoleOverlayTextAreas_[0]->setCaption(input);
+    }
+
+    /**
+        @brief Called if the console gets closed.
+    */
+    void InGameConsole::exit()
+    {
+        this->deactivate();
+        CommandExecutor::execute("set InputMode 2");
+    }
+
+    /**
+        @brief Called once by constructor, initializes the InGameConsole.
+    */
+    void InGameConsole::init()
+    {
         // for the beginning, don't scroll
-        scroll = 0;
-        scrollTimer = 0;
-        cursor = 0;
+        this->scroll_ = 0;
+        this->scrollTimer_ = 0;
+        this->cursor_ = 0;
 
         // create overlay and elements
-        om = &Ogre::OverlayManager::getSingleton();
+        this->om_ = &Ogre::OverlayManager::getSingleton();
 
         // create a container
-        consoleOverlayContainer = static_cast<OverlayContainer*>(om->createOverlayElement("Panel", "container"));
-        consoleOverlayContainer->setMetricsMode(Ogre::GMM_RELATIVE);
-        consoleOverlayContainer->setPosition((1-REL_WIDTH)/2, 0);
-        consoleOverlayContainer->setDimensions(REL_WIDTH, REL_HEIGHT);
+        this->consoleOverlayContainer_ = static_cast<OverlayContainer*>(this->om_->createOverlayElement("Panel", "container"));
+        this->consoleOverlayContainer_->setMetricsMode(Ogre::GMM_RELATIVE);
+        this->consoleOverlayContainer_->setPosition((1 - InGameConsole::REL_WIDTH) / 2, 0);
+        this->consoleOverlayContainer_->setDimensions(InGameConsole::REL_WIDTH, InGameConsole::REL_HEIGHT);
 
         // create BorderPanel
-        consoleOverlayBorder = static_cast<BorderPanelOverlayElement*>(om->createOverlayElement("BorderPanel", "borderPanel"));
-        consoleOverlayBorder->setMetricsMode(Ogre::GMM_PIXELS);
-        consoleOverlayBorder->setMaterialName("ConsoleCenter");
+        this->consoleOverlayBorder_ = static_cast<BorderPanelOverlayElement*>(this->om_->createOverlayElement("BorderPanel", "borderPanel"));
+        this->consoleOverlayBorder_->setMetricsMode(Ogre::GMM_PIXELS);
+        this->consoleOverlayBorder_->setMaterialName("ConsoleCenter");
         // set parameters for border
-        consoleOverlayBorder->setBorderSize(16, 16, 0, 16);
-        consoleOverlayBorder->setBorderMaterialName("ConsoleBorder");
-        consoleOverlayBorder->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
-        consoleOverlayBorder->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
-        consoleOverlayBorder->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
-        consoleOverlayBorder->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
-        consoleOverlayBorder->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
+        this->consoleOverlayBorder_->setBorderSize(16, 16, 0, 16);
+        this->consoleOverlayBorder_->setBorderMaterialName("ConsoleBorder");
+        this->consoleOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
+        this->consoleOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
+        this->consoleOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
+        this->consoleOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
+        this->consoleOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
 
         // create the text lines
-        consoleOverlayTextAreas = new TextAreaOverlayElement*[LINES];
-        for(int i = 0; i<LINES; i++){
-            consoleOverlayTextAreas[i] = static_cast<TextAreaOverlayElement*>(om->createOverlayElement("TextArea", "textArea"+Ogre::StringConverter::toString(i)));
-            consoleOverlayTextAreas[i]->setMetricsMode(Ogre::GMM_PIXELS);
-            consoleOverlayTextAreas[i]->setFontName("Console");
-            consoleOverlayTextAreas[i]->setCharHeight(20);
-            consoleOverlayTextAreas[i]->setParameter("colour_top", "0.21 0.69 0.21");
-            consoleOverlayTextAreas[i]->setLeft(8);
-            consoleOverlayTextAreas[i]->setCaption("");
+        this->consoleOverlayTextAreas_ = new TextAreaOverlayElement*[LINES];
+        for (int i = 0; i < LINES; i++)
+        {
+            this->consoleOverlayTextAreas_[i] = static_cast<TextAreaOverlayElement*>(this->om_->createOverlayElement("TextArea", "textArea" + Ogre::StringConverter::toString(i)));
+            this->consoleOverlayTextAreas_[i]->setMetricsMode(Ogre::GMM_PIXELS);
+            this->consoleOverlayTextAreas_[i]->setFontName("Console");
+            this->consoleOverlayTextAreas_[i]->setCharHeight(20);
+            this->consoleOverlayTextAreas_[i]->setParameter("colour_top", "0.21 0.69 0.21");
+            this->consoleOverlayTextAreas_[i]->setLeft(8);
+            this->consoleOverlayTextAreas_[i]->setCaption("");
         }
 
         // create noise
-        consoleOverlayNoise = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel", "noise"));
-        consoleOverlayNoise->setMetricsMode(Ogre::GMM_PIXELS);
-        consoleOverlayNoise->setPosition(5,0);
-        consoleOverlayNoise->setMaterialName("ConsoleNoise");
-
-        consoleOverlay = om->create("Console");
-        consoleOverlay->add2D(consoleOverlayContainer);
-        consoleOverlayContainer->addChild(consoleOverlayBorder);
-//comment following line to disable noise
-        consoleOverlayContainer->addChild(consoleOverlayNoise);
-        for(int i = 0; i<LINES; i++) consoleOverlayContainer->addChild(consoleOverlayTextAreas[i]);
-        resize();
+        this->consoleOverlayNoise_ = static_cast<PanelOverlayElement*>(this->om_->createOverlayElement("Panel", "noise"));
+        this->consoleOverlayNoise_->setMetricsMode(Ogre::GMM_PIXELS);
+        this->consoleOverlayNoise_->setPosition(5,0);
+        this->consoleOverlayNoise_->setMaterialName("ConsoleNoise");
+
+        this->consoleOverlay_ = this->om_->create("Console");
+        this->consoleOverlay_->add2D(this->consoleOverlayContainer_);
+        this->consoleOverlayContainer_->addChild(this->consoleOverlayBorder_);
+        //comment following line to disable noise
+        this->consoleOverlayContainer_->addChild(this->consoleOverlayNoise_);
+        for (int i = 0; i < LINES; i++)
+            this->consoleOverlayContainer_->addChild(this->consoleOverlayTextAreas_[i]);
+
+        this->resize();
 
         // move overlay "above" the top edge of the screen
         // we take -1.2 because the border mkes the panel bigger
-        consoleOverlayContainer->setTop(-1.2*REL_HEIGHT);
+        this->consoleOverlayContainer_->setTop(-1.2 * InGameConsole::REL_HEIGHT);
         // show overlay
-        consoleOverlay->show();
+        this->consoleOverlay_->show();
 
         COUT(3) << "Info: InGameConsole initialized" << std::endl;
@@ -168,105 +232,143 @@
 
     /**
-    @brief used to control the actual scrolling and cursor
-    */
-    void InGameConsole::tick(float dt){
-        scrollTimer += dt;
-        if(scrollTimer >= 0.01){
-            float top = consoleOverlayContainer->getTop();
-            scrollTimer = 0;
-            if(scroll!=0){
+        @brief Used to control the actual scrolling and the cursor.
+    */
+    void InGameConsole::tick(float dt)
+    {
+        this->scrollTimer_ += dt;
+        if (this->scrollTimer_ >= 0.01)
+        {
+            float top = this->consoleOverlayContainer_->getTop();
+            this->scrollTimer_ = 0;
+            if (this->scroll_ != 0)
+            {
                 // scroll
-                top = top + 0.02*scroll;
-                consoleOverlayContainer->setTop(top);
+                top = top + 0.02 * this->scroll_;
+                this->consoleOverlayContainer_->setTop(top);
             }
-            if(top <= -1.2*REL_HEIGHT){
+            if (top <= -1.2 * InGameConsole::REL_HEIGHT)
+            {
                 // window has completely scrolled up
-                scroll = 0;
-                consoleOverlay->hide();
-                active = false;
+                this->scroll_ = 0;
+                this->consoleOverlay_->hide();
+                this->active_ = false;
             }
-            if(top >= 0){
+            if (top >= 0)
+            {
                 // window has completely scrolled down
-                scroll = 0;
-                consoleOverlayContainer->setTop(0);
-                active = true;
+                this->scroll_ = 0;
+                this->consoleOverlayContainer_->setTop(0);
+                this->active_ = true;
             }
         }
 
-        cursor += dt;
-        if(cursor >= 2*BLINK) cursor = 0;
-        print(convert2UTF(this->ib_->get()));
-
-// this creates a flickering effect
-        consoleOverlayNoise->setTiling(1, rand()%5+1);
-    }
-
-    /**
-    @brief resizes the console elements. call if window size changes
-    */
-    void InGameConsole::resize(){
-        windowW = GraphicsEngine::getSingleton().getWindowWidth();
-        windowH = GraphicsEngine::getSingleton().getWindowHeight();
-        consoleOverlayBorder->setWidth((int) windowW*REL_WIDTH);
-        consoleOverlayBorder->setHeight((int) windowH*REL_HEIGHT);
-        consoleOverlayNoise->setWidth((int) windowW*REL_WIDTH - 10);
-        consoleOverlayNoise->setHeight((int) windowH*REL_HEIGHT - 5);
+        this->cursor_ += dt;
+        if (this->cursor_ >= 2 * InGameConsole::BLINK)
+            this->cursor_ = 0;
+//        print(convert2UTF(this->ib_->get()));
+
+        // this creates a flickering effect
+        this->consoleOverlayNoise_->setTiling(1, rand() % 5 + 1);
+    }
+
+    /**
+        @brief Resizes the console elements. Call if window size changes.
+    */
+    void InGameConsole::resize()
+    {
+        this->windowW_ = GraphicsEngine::getSingleton().getWindowWidth();
+        this->windowH_ = GraphicsEngine::getSingleton().getWindowHeight();
+        this->consoleOverlayBorder_->setWidth((int) this->windowW_* InGameConsole::REL_WIDTH);
+        this->consoleOverlayBorder_->setHeight((int) this->windowH_ * InGameConsole::REL_HEIGHT);
+        this->consoleOverlayNoise_->setWidth((int) this->windowW_ * InGameConsole::REL_WIDTH - 10);
+        this->consoleOverlayNoise_->setHeight((int) this->windowH_ * InGameConsole::REL_HEIGHT - 5);
         // now adjust the text lines...
-        for(int i = 0; i<LINES; i++){
-            consoleOverlayTextAreas[i]->setWidth(windowW*REL_WIDTH);
-            consoleOverlayTextAreas[i]->setTop((int)windowH*REL_HEIGHT - 24 - 16*i);
-        }
-    }
-
-    /**
-    @brief shows console
-    */
-    void InGameConsole::activate(){
-        consoleOverlay->show();
+        for (int i = 0; i < LINES; i++)
+        {
+            this->consoleOverlayTextAreas_[i]->setWidth((int) this->windowW_ * InGameConsole::REL_WIDTH);
+            this->consoleOverlayTextAreas_[i]->setTop((int) this->windowH_ * InGameConsole::REL_HEIGHT - 24 - 16*i);
+        }
+    }
+
+    /**
+        @brief Shows the InGameConsole.
+    */
+    void InGameConsole::activate()
+    {
+        this->consoleOverlay_->show();
         // just in case window size has changed...
-        resize();
+        this->resize();
         // scroll down
-        scroll = 1;
+        this->scroll_ = 1;
         // the rest is done by tick
     }
 
     /**
-    @brief hides console
-    */
-    void InGameConsole::deactivate(){
+    @brief Hides the InGameConsole.
+    */
+    void InGameConsole::deactivate()
+    {
         // scroll up
-        scroll = -1;
+        this->scroll_ = -1;
         // the rest is done by tick
     }
 
     /**
-    @brief prints string to bottom line
-    @param s string to be printed
-    */
-    void InGameConsole::print(Ogre::UTFString s){
-        if(cursor>BLINK) consoleOverlayTextAreas[0]->setCaption(">" + s);
-        else consoleOverlayTextAreas[0]->setCaption(">" + s + "_");
-    }
-
-    /**
-    @brief shifts all lines up and clears the bottom line
-    */
-    void InGameConsole::newline(){
+        @brief Activates the console.
+    */
+    void InGameConsole::openConsole()
+    {
+        InGameConsole::getInstance().activate();
+    }
+
+    /**
+        @brief Deactivates the console.
+    */
+    void InGameConsole::closeConsole()
+    {
+        InGameConsole::getInstance().deactivate();
+    }
+
+    /**
+        @brief Prints string to bottom line.
+        @param s String to be printed
+    */
+    void InGameConsole::print(Ogre::UTFString s)
+    {
+        if (this->cursor_ > InGameConsole::BLINK)
+            this->consoleOverlayTextAreas_[0]->setCaption(">" + s);
+        else
+            this->consoleOverlayTextAreas_[0]->setCaption(">" + s + "_");
+    }
+
+    /**
+        @brief Shifts all lines up and clears the bottom line.
+    */
+    void InGameConsole::newline()
+    {
         Ogre::UTFString line;
-        for(int i = LINES-1; i>=1; i--){
-            line = consoleOverlayTextAreas[i-1]->getCaption();
+        for (int i = LINES - 1; i >= 1; i--)
+        {
+            line = this->consoleOverlayTextAreas_[i - 1]->getCaption();
             // don't copy the cursor...
             int l = line.length();
-            if(!line.empty() && line.substr(l-1) == "_") line.erase(l-1);
-            consoleOverlayTextAreas[i]->setCaption(line);
-        }
-        consoleOverlayTextAreas[0]->setCaption(">");
-    }
-
-    Ogre::UTFString InGameConsole::convert2UTF(std::string s){
+            if (!line.empty() && line.substr(l-1) == "_")
+                line.erase(l-1);
+            this->consoleOverlayTextAreas_[i]->setCaption(line);
+        }
+        this->consoleOverlayTextAreas_[0]->setCaption(">");
+    }
+
+    /**
+        @brief Converts a string into an Ogre::UTFString.
+        @param s The string to convert
+        @return The converted string
+    */
+    Ogre::UTFString InGameConsole::convert2UTF(std::string s)
+    {
         Ogre::UTFString utf;
-        int i;
         Ogre::UTFString::code_point cp;
-        for (i=0; i<(int)s.size(); ++i){
+        for (unsigned int i = 0; i < s.size(); ++i)
+        {
           cp = s[i];
           cp &= 0xFF;
Index: code/branches/console/src/orxonox/console/InGameConsole.h
===================================================================
--- code/branches/console/src/orxonox/console/InGameConsole.h	(revision 1316)
+++ code/branches/console/src/orxonox/console/InGameConsole.h	(revision 1317)
@@ -37,44 +37,58 @@
 
 #include "core/Tickable.h"
-#include "core/InputBuffer.h"
+#include "core/Shell.h"
 
 
 namespace orxonox
 {
-    class _OrxonoxExport InGameConsole : public InputBufferListener
+    class _OrxonoxExport InGameConsole : public Tickable, public ShellListener
     {
         public:
-            InGameConsole(InputBuffer* ib);
-            ~InGameConsole();
-            void listen();
-            void execute();
-            void hintandcomplete();
-            void clear();
-            void removeLast();
-            void exit();
-            void init();
+            static InGameConsole& getInstance();
+
+            void setConfigValues();
+
+            virtual void linesChanged();
+            virtual void onlyLastLineChanged();
+            virtual void lineAdded();
+            virtual void inputChanged();
+            virtual void cursorChanged();
+            virtual void exit();
+
             void tick(float dt);
+
             void activate();
             void deactivate();
 
+            static void openConsole();
+            static void closeConsole();
+
         private:
+            InGameConsole();
+            InGameConsole(const InGameConsole& other);
+            ~InGameConsole();
+
+            void init();
             void resize();
             void print(Ogre::UTFString s);
             void newline();
-            Ogre::UTFString convert2UTF(std::string s);
+            static Ogre::UTFString convert2UTF(std::string s);
 
-            int windowW;
-            int windowH;
-            int scroll;
-            float scrollTimer;
-            float cursor;
-            bool active;
-            InputBuffer* ib_;
-            Ogre::OverlayManager* om;
-            Ogre::Overlay* consoleOverlay;
-            Ogre::OverlayContainer* consoleOverlayContainer;
-            Ogre::PanelOverlayElement* consoleOverlayNoise;
-            Ogre::BorderPanelOverlayElement* consoleOverlayBorder;
-            Ogre::TextAreaOverlayElement** consoleOverlayTextAreas;
+            static float REL_WIDTH;
+            static float REL_HEIGHT;
+            static float BLINK;
+
+            int windowW_;
+            int windowH_;
+            int scroll_;
+            float scrollTimer_;
+            float cursor_;
+            bool active_;
+            Ogre::OverlayManager* om_;
+            Ogre::Overlay* consoleOverlay_;
+            Ogre::OverlayContainer* consoleOverlayContainer_;
+            Ogre::PanelOverlayElement* consoleOverlayNoise_;
+            Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
+            Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
     };
 }
