Index: code/branches/notifications/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/notifications/src/libraries/core/GUIManager.cc	(revision 7326)
+++ code/branches/notifications/src/libraries/core/GUIManager.cc	(revision 7338)
@@ -240,7 +240,7 @@
         The function executes the Lua function with the same name in case the GUIManager is ready.
     */
-    /*static*/ void GUIManager::showGUI(const std::string& name, bool bHidePrevious)
-    {
-        GUIManager::getInstance().executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ")");
+    /*static*/ void GUIManager::showGUI(const std::string& name, bool bHidePrevious, bool bNoInput)
+    {
+        GUIManager::getInstance().executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + multi_cast<std::string>(bNoInput) + ")");
     }
 
@@ -249,7 +249,7 @@
         Hack-ish. Needed for GUIOverlay.
     */
-    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious)
-    {
-        this->executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + ptr + ")");
+    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious, bool bNoInput)
+    {
+        this->executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + multi_cast<std::string>(bNoInput) + ", " + ptr + ")");
     }
 
Index: code/branches/notifications/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/notifications/src/libraries/core/GUIManager.h	(revision 7326)
+++ code/branches/notifications/src/libraries/core/GUIManager.h	(revision 7338)
@@ -75,6 +75,6 @@
 
         void loadGUI(const std::string& name);
-        static void showGUI(const std::string& name, bool bHidePrevious = false);
-        void showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious = false);
+        static void showGUI(const std::string& name, bool bHidePrevious = false, bool bNoInput = false);
+        void showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious = false, bool bNoInput = false);
         static void hideGUI(const std::string& name);
         void keyESC();
Index: code/branches/notifications/src/modules/notifications/CMakeLists.txt
===================================================================
--- code/branches/notifications/src/modules/notifications/CMakeLists.txt	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/CMakeLists.txt	(revision 7338)
@@ -3,5 +3,4 @@
   NotificationDispatcher.cc
   NotificationManager.cc
-  NotificationOverlay.cc
   NotificationQueue.cc
 )
@@ -17,5 +16,4 @@
   LINK_LIBRARIES
     orxonox
-    overlays
   SOURCE_FILES ${NOTIFICATIONS_SRC_FILES}
 )
Index: code/branches/notifications/src/modules/notifications/Notification.cc
===================================================================
--- code/branches/notifications/src/modules/notifications/Notification.cc	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/Notification.cc	(revision 7338)
@@ -94,5 +94,5 @@
         registerVariable(this->message_);
         registerVariable(this->sender_);
-        registerVariable(this->sent_);
+        registerVariable(this->sent_, ObjectDirection::Bidirectional);
     }
 
@@ -108,10 +108,17 @@
     {
 
-        callMemberNetworkFunction(Notification, sendHelper, this->getObjectID(), clientId, clientId, sender);
+        if(GameMode::isMaster())
+        {
+            this->sendHelper(sender);
+        }
+        else
+        {
+            callMemberNetworkFunction(Notification, sendHelper, this->getObjectID(), clientId, sender);
+        }
 
         return true;
     }
 
-    bool Notification::sendHelper(unsigned int clientId, const std::string& sender)
+    bool Notification::sendHelper(const std::string& sender)
     {
         if(this->isSent()) //TODO: Needed?
Index: code/branches/notifications/src/modules/notifications/Notification.h
===================================================================
--- code/branches/notifications/src/modules/notifications/Notification.h	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/Notification.h	(revision 7338)
@@ -58,5 +58,5 @@
 
             bool send(unsigned int clientId, const std::string & sender); //!< Sends the Notification to the Notificationmanager.
-            bool sendHelper(unsigned int clientId, const std::string& sender);
+            bool sendHelper(const std::string& sender);
 
             /**
Index: code/branches/notifications/src/modules/notifications/NotificationManager.cc
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationManager.cc	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/NotificationManager.cc	(revision 7338)
@@ -40,4 +40,6 @@
 #include "Notification.h"
 #include "interfaces/NotificationListener.h"
+#include "core/GUIManager.h"
+#include "NotificationQueue.h"
 
 namespace orxonox
@@ -47,5 +49,5 @@
     const std::string NotificationManager::NONE("none");
 
-    ManageScopedSingleton(NotificationManager, ScopeID::Root, false);
+    ManageScopedSingleton(NotificationManager, ScopeID::Graphics, false);
 
     /**
@@ -58,4 +60,9 @@
 
         this->highestIndex_ = 0;
+
+        //TODO: What if no graphics?
+        GUIManager::getInstance().loadGUI("NotificationLayer");
+        // Create first queue:
+        NotificationQueue* queue = new NotificationQueue("general");
     }
 
Index: code/branches/notifications/src/modules/notifications/NotificationManager.h
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationManager.h	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/NotificationManager.h	(revision 7338)
@@ -71,13 +71,4 @@
 
             /**
-            @brief Fetches the Notifications for a specific NotificationListener starting at a specified time.
-            @param listener The NotificationListener the Notifications are fetched for.
-            @param map A multimap, in which the notifications are stored.
-            @param timeFrameStart The start time the Notifications are fetched from.
-            @return Returns true if successful.
-            */
-            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart)
-                { return this->getNotifications(listener, map, timeFrameStart, std::time(0)); }
-            /**
             @brief Fetches the Notifications for a specific NotificationListener starting at a specified timespan before now.
             @param listener The NotificationListener the Notifications are fetched for.
Index: code/branches/notifications/src/modules/notifications/NotificationOverlay.cc
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationOverlay.cc	(revision 7326)
+++ 	(revision )
@@ -1,136 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the NotificationOverlay class.
-*/
-
-#include "NotificationOverlay.h"
-
-#include "util/Exception.h"
-#include "core/CoreIncludes.h"
-#include "Notification.h"
-#include "NotificationQueue.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        Constructor. Intializes the class.
-    */
-    NotificationOverlay::NotificationOverlay(BaseObject* creator) : OverlayText(creator)
-    {
-        RegisterObject(NotificationOverlay);
-        this->initialize();
-    }
-
-    /**
-    @brief
-        Constructor. Initializes the class creates a graphical representation of the input Notification for the input Queue.
-    @param queue
-        A pointer to the queue the NotificatonOverlay belongs to.
-    @param notification
-        A pointer to the Notification represented by this overlay.
-    @throws Argument
-        Throws an Argument-Exception if either no Notification or no NotificationQueue were input.
-    */
-    NotificationOverlay::NotificationOverlay(NotificationQueue* queue, Notification* notification) : OverlayText(NULL)
-    {
-        this->initialize();
-
-        if(notification == NULL || queue == NULL) //!> If either notification or queue are not given an Exception is thrown.
-        {
-            ThrowException(Argument, "There were NULL-Pointer arguments in NotificationOverlay creation.");
-        }
-
-        this->queue_ = queue;
-        this->defineOverlay();
-
-        this->processNotification(notification);
-    }
-
-    /**
-    @brief
-        Initializes and Registers the object.
-    */
-    void NotificationOverlay::initialize(void)
-    {
-        this->queue_ = NULL;
-    }
-
-    /**
-    @brief
-        Set some Overlay-specific values.
-    */
-    void NotificationOverlay::defineOverlay(void)
-    {
-        this->setFont(this->queue_->getFont());
-        this->setTextSize(this->queue_->getFontSize());
-
-        this->setPosition(this->queue_->getPosition());
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    NotificationOverlay::~NotificationOverlay()
-    {
-    }
-
-    /**
-    @brief
-        Processes the input notification, resp. sees to it. that the NotificationOverlay displays the Notification message.
-    @param notification
-        A pointer to the notification that should be processed.
-    @return
-        Returns true if successful.
-    */
-    bool NotificationOverlay::processNotification(Notification* notification)
-    {
-        if(notification == NULL)
-            return false;
-        this->setCaption(clipMessage(notification->getMessage()));
-        this->notification_ = notification;
-        return true;
-    }
-
-    /**
-    @brief
-        Clips the input message so that it meets the requirements for the maximal length of Notifications given by the NotificationQueue.
-    */
-    std::string NotificationOverlay::clipMessage(const std::string & message)
-    {
-        if(message.length() <= static_cast<unsigned int>(this->queue_->getNotificationLength())) //!< If the message is not too long.
-            return message;
-        return message.substr(0, this->queue_->getNotificationLength());
-    }
-
-}
Index: code/branches/notifications/src/modules/notifications/NotificationOverlay.h
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationOverlay.h	(revision 7326)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Definition of the NotificationOverlay class.
-*/
-
-
-#ifndef _NotificationOverlay_H__
-#define _NotificationOverlay_H__
-
-#include "notifications/NotificationsPrereqs.h"
-
-#include <string>
-#include "overlays/OverlayText.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        The NotificationOverlay is used to display single Notifications, then bundled in a NotificationQueue.
-    @author
-        Damian 'Mozork' Frick
-    */
-    class _NotificationsExport NotificationOverlay : public OverlayText
-    {
-
-        public:
-            NotificationOverlay(BaseObject* creator);
-            NotificationOverlay(NotificationQueue* queue, Notification* notification);
-            virtual ~NotificationOverlay();
-
-            bool processNotification(Notification* notification); //!< Processes the input Notification.
-
-            /**
-            @brief Sets the font size of this overlay's text.
-            @param size The font size.
-            */
-            inline void setFontSize(float size)
-                { this->setTextSize(size); }
-
-        protected:
-            std::string clipMessage(const std::string & message); //!< Clips the input message if too long.
-
-        private:
-            NotificationQueue* queue_; //!< The NotificationQeue this overlay belongs to.
-            Notification* notification_; //!< The Notification this overlay displays.
-
-            void initialize(void); //!< Initializes the object.
-            void defineOverlay(void); //!< Sets some overlay-specific values.
-
-    };
-
-}
-
-#endif /* _NotificationOverlay_H__ */
Index: code/branches/notifications/src/modules/notifications/NotificationQueue.cc
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationQueue.cc	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/NotificationQueue.cc	(revision 7338)
@@ -37,11 +37,11 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "NotificationOverlay.h"
-#include "NotificationManager.h"
+#include "Notification.h"
+#include "core/GUIManager.h"
+#include "core/LuaState.h"
+#include <algorithm>
 
 namespace orxonox
 {
-
-    CreateFactory(NotificationQueue);
 
     const std::string NotificationQueue::DEFAULT_FONT("VeraMono");
@@ -53,10 +53,25 @@
         Constructor. Creates and initializes the object.
     */
-    NotificationQueue::NotificationQueue(BaseObject* creator) : OverlayGroup(creator)
+    NotificationQueue::NotificationQueue(const std::string& name, const std::string& senders, unsigned int size, const Vector2& position, unsigned int length, unsigned int displayTime)
     {
         this->registered_ = false;
 
-        RegisterObject(NotificationQueue);
+        RegisterRootObject(NotificationQueue);
+
         this->initialize();
+
+        this->setTargets(senders);
+        this->name_ = name;
+        this->maxSize_ = size;
+        this->position_ = position;
+        this->notificationLength_ = length;
+        this->setDisplayTime(displayTime);
+
+        this->create();
+
+        NotificationManager::getInstance().registerListener(this);
+        this->registered_ = true;
+
+        COUT(3) << "NotificationQueue '" << this->getName() << "' created." << std::endl;
     }
 
@@ -83,45 +98,14 @@
         this->size_ = 0;
         this->tickTime_ = 0.0;
-
-        NotificationManager::getInstance().registerListener(this);
-        this->registered_ = true;
-    }
-
-    /**
-    @brief
-        Sets the defaults.
-    */
-    void NotificationQueue::setDefaults(void)
-    {
-        this->setMaxSize(DEFAULT_SIZE);
-        this->setNotificationLength(DEFAULT_LENGTH);
-        this->setDisplayTime(DEFAULT_DISPLAY_TIME);
-        this->setPosition(DEFAULT_POSITION);
-
-        this->setTargets(NotificationManager::ALL);
-
-        this->setFontSize(DEFAULT_FONT_SIZE);
-        this->setFont(DEFAULT_FONT);
-    }
-
-    /**
-    @brief
-        Method for creating a NotificationQueue object through XML.
-    */
-    void NotificationQueue::XMLPort(Element& xmlElement, XMLPort::Mode mode)
-    {
-        SUPER(NotificationQueue, XMLPort, xmlElement, mode);
-
-        this->setDefaults();
-
-        XMLPortParam(NotificationQueue, "maxSize", setMaxSize, getMaxSize, xmlElement, mode);
-        XMLPortParam(NotificationQueue, "notificationLength", setNotificationLength, getNotificationLength, xmlElement, mode);
-        XMLPortParam(NotificationQueue, "displayTime", setDisplayTime, getDisplayTime, xmlElement, mode);
-        XMLPortParam(NotificationQueue, "targets", setTargets, getTargets, xmlElement, mode);
-        XMLPortParam(NotificationQueue, "font", setFont, getFont, xmlElement, mode);
-        XMLPortParam(NotificationQueue, "fontSize", setFontSize, getFontSize, xmlElement, mode);
-        XMLPortParam(NotificationQueue, "position", setPosition, getPosition, xmlElement, mode);
-
-        COUT(3) << "NotificationQueue '" << this->getName() << "' created." << std::endl;
+    }
+
+    /**
+    //TODO: Document.
+    */
+    void NotificationQueue::create(void)
+    {
+        //TODO: Also transfer font and fontsize.
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.createQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getMaxSize()) + ")");
+        this->positionChanged();
     }
 
@@ -139,14 +123,13 @@
             this->timeLimit_.time = std::time(0)-this->displayTime_; //!< Container containig the current time.
 
-            std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it;
-            it = this->containers_.begin();
-            while(it != this->containers_.upper_bound(&this->timeLimit_)) //!< Iterate through all elements whose creation time is smaller than the current time minus the display time.
+            std::multiset<NotificationContainer*, NotificationContainerCompare>::iterator it = this->ordering_.begin();
+            while(it != this->ordering_.upper_bound(&this->timeLimit_)) //!< Iterate through all elements whose creation time is smaller than the current time minus the display time.
             {
-                this->removeContainer(*it);
-                this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize())));
-                it = this->containers_.begin(); //TODO: Needed?
+                NotificationContainer* temp = *it;
+                it++;
+                this->remove(temp);
             }
 
-            this->tickTime_ = 0.0f; //!< Reset time counter.
+            this->tickTime_ = this->tickTime_ - (int)this->tickTime_; //!< Reset time counter.
         }
     }
@@ -161,5 +144,5 @@
         this->clear();
 
-        std::multimap<std::time_t,Notification*>* notifications = new std::multimap<std::time_t,Notification*>;
+        std::multimap<std::time_t, Notification*>* notifications = new std::multimap<std::time_t, Notification*>;
         if(!NotificationManager::getInstance().getNotifications(this, notifications, this->displayTime_)) //!< Get the Notifications sent in the interval form now to minus the display time.
         {
@@ -171,8 +154,6 @@
             return;
 
-        for(std::multimap<std::time_t,Notification*>::iterator it = notifications->begin(); it != notifications->end(); it++) //!> Add all Notifications.
-        {
-            this->addNotification(it->second, it->first);
-        }
+        for(std::multimap<std::time_t, Notification*>::iterator it = notifications->begin(); it != notifications->end(); it++) //!> Add all Notifications.
+            this->push(it->second, it->first);
 
         delete notifications;
@@ -191,15 +172,22 @@
     void NotificationQueue::update(Notification* notification, const std::time_t & time)
     {
-        this->addNotification(notification, time);
-
-        std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it;
-        while(this->getSize() > this->getMaxSize())
-        {
-            it = this->containers_.begin();
-            this->removeContainer(*it);
-            this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize())));
-        }
-
-        COUT(4) << "NotificationQueue '" << this->getName() << "' updated. A new Notifications has been added." << std::endl;
+        this->push(notification, time);
+
+        COUT(4) << "NotificationQueue '" << this->getName() << "' updated. A new Notification has been added." << std::endl;
+    }
+
+    /**
+    @brief
+        Sets the name of the NotificationQueue.
+    @param name
+        The name to be set.
+    @return
+        returns true if successful.
+    */
+    bool NotificationQueue::setName(const std::string& name)
+    {
+        //TODO: Test uniqueness of name.
+        this->name_ = name;
+        return true;
     }
 
@@ -212,11 +200,8 @@
         Returns true if successful.
     */
-    bool NotificationQueue::setMaxSize(int size)
-    {
-        if(size < 0)
-            return false;
+    void NotificationQueue::setMaxSize(unsigned int size)
+    {
         this->maxSize_ = size;
         this->update();
-        return true;
     }
 
@@ -229,11 +214,8 @@
         Returns true if successful.
     */
-    bool NotificationQueue::setNotificationLength(int length)
-    {
-        if(length < 0)
-            return false;
+    void NotificationQueue::setNotificationLength(unsigned int length)
+    {
         this->notificationLength_ = length;
         this->update();
-        return true;
     }
 
@@ -246,11 +228,8 @@
         Returns true if successful.
     */
-    bool NotificationQueue::setDisplayTime(int time)
-    {
-        if(time < 0)
-            return false;
+    void NotificationQueue::setDisplayTime(unsigned int time)
+    {
         this->displayTime_ = time;
         this->update();
-        return true;
     }
 
@@ -330,9 +309,5 @@
         if(size <= 0)
             return false;
-        this->fontSize_ = size;
-        for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); it++) //!< Set the font size for each overlay.
-        {
-            it->second->overlay->setFontSize(size);
-        }
+        
         return true;
     }
@@ -348,9 +323,5 @@
     bool NotificationQueue::setFont(const std::string & font)
     {
-        this->font_ = font;
-        for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); it++) //!< Set the font for each overlay.
-        {
-            it->second->overlay->setFont(font);
-        }
+        
         return true;
     }
@@ -358,29 +329,9 @@
     /**
     @brief
-        Scrolls the NotificationQueue, meaning all NotificationOverlays are moved the input vector.
-    @param pos
-        The vector the NotificationQueue is scrolled.
-    */
-    void NotificationQueue::scroll(const Vector2 pos)
-    {
-        for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); ++it) //!< Scroll each overlay.
-        {
-            it->second->overlay->scroll(pos);
-        }
-    }
-
-    /**
-    @brief
         Aligns all the Notifications to the position of the NotificationQueue.
     */
     void NotificationQueue::positionChanged(void)
     {
-        int counter = 0;
-        for (std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it = this->containers_.begin(); it != this->containers_.end(); it++) //!< Set the position for each overlay.
-        {
-            (*it)->overlay->setPosition(this->getPosition());
-            (*it)->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*counter));
-            counter++;
-        }
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changePosition(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getPosition().x) + ", " + multi_cast<std::string>(this->getPosition().y) + ")");
     }
 
@@ -388,5 +339,5 @@
     @brief
         Adds a Notification, to the queue.
-        It inserts it into the storage containers, creates an corresponding overlay and a container.
+        It inserts it into the storage containers, creates a corresponding container and pushes the Notification message to the GUI.
     @param notification
         The Notification.
@@ -394,47 +345,52 @@
         The time.
     */
-    void NotificationQueue::addNotification(Notification* notification, const std::time_t & time)
-    {
-        NotificationOverlayContainer* container = new NotificationOverlayContainer;
-        container->overlay = new NotificationOverlay(this, notification);
+    void NotificationQueue::push(Notification* notification, const std::time_t & time)
+    {
+        NotificationContainer* container = new NotificationContainer;
         container->notification = notification;
         container->time = time;
-        std::string timeString = std::ctime(&time);
-        timeString.erase(timeString.length()-1);
-        const std::string& addressString = multi_cast<std::string>(reinterpret_cast<unsigned long>(notification));
-        container->name = "NotificationOverlay(" + timeString + ")&" + addressString;
-
-        this->containers_.insert(container);
-        this->overlays_[notification] = container;
-        this->addElement(container->overlay);
-        this->size_= this->size_+1;
-
-        container->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*(this->getSize()-1)));
-    }
-
-    /**
-    @brief
-        Removes a container from the queue.
+        
+        // If the maximum size of the NotificationQueue has been reached the last (least recently added) Notification is removed.
+        if(this->getSize() >= this->getMaxSize())
+            this->pop();
+
+        this->size_++;
+
+        this->ordering_.insert(container);
+        this->notifications_.insert(this->notifications_.begin(), container);
+
+        //TODO: Clip message if necessary.
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.pushNotification(\"" + this->getName() + "\", \"" + notification->getMessage() + "\")");
+    }
+
+    /**
+    @brief
+        Removes the least recently added Notification form the NotificationQueue.
+    */
+    void NotificationQueue::pop(void)
+    {
+        NotificationContainer* container = this->notifications_.back();
+        this->ordering_.erase(container);
+        this->notifications_.pop_back();
+        this->size_--;
+        delete container;
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.popNotification(\"" + this->getName() + "\")");
+    }
+
+    /**
+    @brief
+        Removes the Notification that is stored in the input container.
     @param container
-        A pointer to the container.
-    @return
-        Returns true if successful.
-    */
-    bool NotificationQueue::removeContainer(NotificationOverlayContainer* container)
-    {
-        if(this->size_ == 0) //!< You cannot remove anything if the queue is empty.
-            return false;
-
-        // Unregister the NotificationQueue with the NotificationManager.
-        NotificationManager::getInstance().unregisterNotification(container->notification, this);
-
-        this->removeElement(container->overlay);
-        this->containers_.erase(container);
-        this->overlays_.erase(container->notification);
-        container->overlay->destroy();
+        The NotificationContainer with the Notification to be removed.
+    */
+    void NotificationQueue::remove(NotificationContainer* container)
+    {
+        std::vector<NotificationContainer*>::iterator it = std::find(this->notifications_.begin(), this->notifications_.end(), container);
+        std::vector<NotificationContainer*>::difference_type index = it - this->notifications_.begin ();
+        this->ordering_.erase(container);
+        this->notifications_.erase(it);
+        this->size_--;
         delete container;
-        this->size_= this->size_-1;
-
-        return true;
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.removeNotification(\"" + this->getName() + "\", " + multi_cast<std::string>(index) + ")");
     }
 
@@ -445,10 +401,12 @@
     void NotificationQueue::clear(void)
     {
-        std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it = this->containers_.begin();
-        while(it != this->containers_.end())
-        {
-            this->removeContainer(*it);
-            it = this->containers_.begin();
-        }
+        this->ordering_.clear();
+        for(std::vector<NotificationContainer*>::iterator it = this->notifications_.begin(); it != this->notifications_.end(); it++)
+        {
+            delete *it;
+        }
+        this->notifications_.clear();
+        this->size_ = 0;
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.clearQueue(\"" + this->getName() + "\")");
     }
 
Index: code/branches/notifications/src/modules/notifications/NotificationQueue.h
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationQueue.h	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/NotificationQueue.h	(revision 7338)
@@ -41,9 +41,11 @@
 #include <set>
 #include <string>
+#include <vector>
 
 #include "util/Math.h"
+#include "core/OrxonoxClass.h"
 #include "tools/interfaces/Tickable.h"
-#include "overlays/OverlayGroup.h"
 #include "interfaces/NotificationListener.h"
+#include "NotificationManager.h"
 
 namespace orxonox
@@ -51,15 +53,13 @@
 
     //! Container to allow easy handling.
-    struct NotificationOverlayContainer
+    struct NotificationContainer
     {
-        NotificationOverlay* overlay; //!< Pointer to the NotificationOverlay, everything is about.
         Notification* notification; //!< The Notification displayed by the overlay.
         time_t time; //!< The time the Notification was sent and thus first displayed.
-        std::string name; //!< The name of the overlay.
     };
 
     //! Struct to allow ordering of NotificationOverlayContainers.
-    struct NotificationOverlayContainerCompare {
-        bool operator() (const NotificationOverlayContainer* const & a, const NotificationOverlayContainer* const & b) const
+    struct NotificationContainerCompare {
+        bool operator() (const NotificationContainer* const & a, const NotificationContainer* const & b) const
             { return a->time < b->time; } //!< Ordered by time.
     };
@@ -68,30 +68,14 @@
     @brief
         Displays Notifications from specific senders.
-        Beware! The NotificationQueue is an OverlayGruop and thus cannot be be a sub-element of an OverlayGroup (at least no for now.)
-
-        Creating a NotificationQueue through XML goes as follows:
-        Be aware that the NotificationQueue must be inside the <Level></Level> tags or bad things will happen.
-        <NotificationQueue
-            name = "SuperQueue" //Name of your OverlayQueue.
-            maxSize = "5" //The maximum number of Notifications displayed. (Default is 5)
-            notificationLength = "64" //The maximum number of characters of a Notification, that are displayed. (Default is 64)
-            displayTime = "30" //The time a Notification is displayed in seconds. (Default is 30)
-            targets = "target1, target2" //The senders this NotificationQueue displays Notifications from. (all, if all Notifications should be displayed.)
-            font = "VeraMono" //The font (Default is VeraMono)
-            fontSize = '0.4' //The font size. (Default is 0.025)
-            position = "0.0, 0.0" //The position of the NotificationQueue. (Default is 0.0,0.0)
-        />
     @author
         Damian 'Mozork' Frick
     */
 
-    class _NotificationsExport NotificationQueue : public OverlayGroup, public Tickable, public NotificationListener
+    class _NotificationsExport NotificationQueue : public Tickable, public NotificationListener
     {
 
         public:
-            NotificationQueue(BaseObject* creator);
+            NotificationQueue(const std::string& name, const std::string& senders = NotificationManager::ALL, unsigned int size = NotificationQueue::DEFAULT_SIZE, const Vector2& position = NotificationQueue::DEFAULT_POSITION, unsigned int length = NotificationQueue::DEFAULT_LENGTH, unsigned int displayTime = NotificationQueue::DEFAULT_DISPLAY_TIME);
             virtual ~NotificationQueue();
-
-            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); //!< Method for creating a NotificationQueue object through XML.
 
             virtual void tick(float dt); //!< To update from time to time.
@@ -101,8 +85,15 @@
 
             /**
+            @brief Get the name of the NotificationQueue.
+            @return Returns the name.
+            */
+            inline const std::string& getName() const
+                { return this->name_; }
+
+            /**
             @brief Returns the maximum number of Notifications displayed.
             @return Returns maximum size.
             */
-            inline int getMaxSize() const
+            inline unsigned int getMaxSize() const
                 { return this->maxSize_; }
             /**
@@ -110,5 +101,5 @@
             @return Returns the size of the queue.
             */
-            inline int getSize() const
+            inline unsigned int getSize() const
                 { return this->size_; }
             /**
@@ -116,5 +107,5 @@
             @return Returns the maximum Notification length.
             */
-            inline int getNotificationLength() const
+            inline unsigned int getNotificationLength() const
                 { return this->notificationLength_; }
             /**
@@ -122,5 +113,5 @@
             @return Returns the display time.
             */
-            inline int getDisplayTime() const
+            inline float getDisplayTime() const
                 { return this->displayTime_; }
             /**
@@ -158,10 +149,8 @@
                 { this->position_ = pos; this->positionChanged(); }
 
-            void scroll(const Vector2 pos); //!< Scrolls the NotificationQueue, meaning all NotificationOverlays are moved the input vector.
-
         private:
-            static const int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed.
-            static const int DEFAULT_LENGTH = 64; //!< The default maximum number of characters displayed.
-            static const int DEFAULT_DISPLAY_TIME = 30; //!< The default display time.
+            static const unsigned int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed.
+            static const unsigned int DEFAULT_LENGTH = 64; //!< The default maximum number of characters displayed.
+            static const unsigned int DEFAULT_DISPLAY_TIME = 30; //!< The default display time.
             static const float DEFAULT_FONT_SIZE; //!< The default font size.
 
@@ -169,8 +158,10 @@
             static const Vector2 DEFAULT_POSITION; //!< the default position.
 
-            int maxSize_; //!< The maximal number of Notifications displayed.
-            int size_; //!< The number of Notifications displayed.
-            int notificationLength_; //!< The maximal number of characters a Notification-message is allowed to have.
-            int displayTime_; //!< The time a Notification is displayed.
+            std::string name_; //!< The name of the NotificationQueue.
+
+            unsigned int maxSize_; //!< The maximal number of Notifications displayed.
+            unsigned int size_; //!< The number of Notifications displayed.
+            unsigned int notificationLength_; //!< The maximal number of characters a Notification-message is allowed to have.
+            unsigned int displayTime_; //!< The time a Notification is displayed.
             Vector2 position_; //!< The position of the NotificationQueue.
 
@@ -180,18 +171,20 @@
             std::string font_; //!< The font.
 
-            std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare> containers_; //!< Multiset, because the ordering is based on, not necessarily unique, timestamps.
-            std::map<Notification*, NotificationOverlayContainer*> overlays_; //!< Mapping notifications to their corresponding overlay containers, for easier association and finding.
+            std::multiset<NotificationContainer*, NotificationContainerCompare> ordering_; //!< Multiset, because the ordering is based on, not necessarily unique, timestamps. //TODO: Would set work as well?
+            std::vector<NotificationContainer*> notifications_;
 
             float tickTime_; //!< Helper variable, to not have to check for overlays that have been displayed too long, every tick.
-            NotificationOverlayContainer timeLimit_; //!< Helper object to check against to determine whether Notifications have expired.
+            NotificationContainer timeLimit_; //!< Helper object to check against to determine whether Notifications have expired.
 
             bool registered_; //!< Helper variable to remember whether the NotificationQueue is registered already.
 
             void initialize(void); //!< Initializes the object.
-            void setDefaults(void); //!< Helper method to set the default values.
-
-            bool setMaxSize(int size); //!< Sets the maximum number of displayed Notifications.
-            bool setNotificationLength(int length); //!< Sets the maximum number of characters a Notification message displayed by this queue is allowed to have.
-            bool setDisplayTime(int time); //!< Sets the maximum number of seconds a Notification is displayed.
+            void create(void);
+
+            bool setName(const std::string& name); //!< Sets the name of the NotificationQueue.
+
+            void setMaxSize(unsigned int size); //!< Sets the maximum number of displayed Notifications.
+            void setNotificationLength(unsigned int length); //!< Sets the maximum number of characters a Notification message displayed by this queue is allowed to have.
+            void setDisplayTime(unsigned int time); //!< Sets the maximum number of seconds a Notification is displayed.
 
             bool setTargets(const std::string & targets); //!< Set the targets of this queue.
@@ -202,6 +195,7 @@
             void positionChanged(void); //!< Aligns all the Notifications to the position of the NotificationQueue.
 
-            void addNotification(Notification* notification, const std::time_t & time); //!< Add a notification to the queue.
-            bool removeContainer(NotificationOverlayContainer* container); //!< Remove a container from the queue.
+            void push(Notification* notification, const std::time_t & time); //!< Add a notification to the queue.
+            void pop(void);
+            void remove(NotificationContainer* container);
 
             void clear(void); //!< Clear the queue.
Index: code/branches/notifications/src/modules/notifications/NotificationsPrereqs.h
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationsPrereqs.h	(revision 7326)
+++ code/branches/notifications/src/modules/notifications/NotificationsPrereqs.h	(revision 7338)
@@ -68,5 +68,4 @@
     class NotificationDispatcher;
     class NotificationManager;
-    class NotificationOverlay;
     class NotificationQueue;
     
