Index: code/trunk/src/modules/questsystem/QuestGUI.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUI.h	(revision 5758)
+++ code/trunk/src/modules/questsystem/QuestGUI.h	(revision 5760)
@@ -60,6 +60,11 @@
             virtual ~QuestGUI();
 
+            void update(void); //!< Update the GUI.
             CEGUI::Window* getGUI(void); //!< Get the root CEGUI Window of the GUI.
-            void update(void); //!< Update the GUI.
+
+            CEGUI::Window* getWindow(void); //!< Get a CEGUI Window to use.
+            void giveWindow(CEGUI::Window* window); //!< Return a no longer needed CEGUI Window for reuse.
+
+            static QuestGUINode* findNode(CEGUI::Window* window); //!< Finde the QuestGUINode belonging to the input CEGUI Window.
 
             /**
@@ -75,8 +80,4 @@
             inline CEGUI::Window* getRootWindow(void)
                 { return this->rootWindow_; }
-
-            CEGUI::Window* getWindow(void); //!< Get a CEGUI Window to use.
-            void giveWindow(CEGUI::Window* window); //!< Return a no longer needed CEGUI Window for reuse.
-
             /**
             @brief Retreive the player.
@@ -85,6 +86,4 @@
             inline PlayerInfo* getPlayer(void)
                 { return this->player_; }
-
-            static QuestGUINode* findNode(CEGUI::Window* window); //!< Finde the QuestGUINode belonging to the input CEGUI Window.
     
         private:
@@ -93,10 +92,11 @@
 
             void clear(void); //!< Clear the QuestGUI.
-            
-            PlayerInfo* player_; //!< The player that owns the GUI.
-            CEGUI::WindowManager* windowManager_; //!< The CEGUI WindowManager. //TODO: needed?
-            CEGUI::Window* rootWindow_; //!< The root CEGUI Window of the GUI.
 
             QuestGUINode* root_; //!< An empty QuestGUINode being the parent of all otherwise parent-less nodes.
+
+            CEGUI::WindowManager* windowManager_; //!< The CEGUI WindowManager.
+            CEGUI::Window* rootWindow_; //!< The root CEGUI Window of the GUI.
+            PlayerInfo* player_; //!< The player that owns the GUI.
+
             std::map<CEGUI::Window*, QuestGUINode*> nodes_; //!< A list of all QuestGUINodes, ordered by their respective CEGUI Windows.
             std::list<CEGUI::Window*> windows_; //!< A list of windows to be used.
Index: code/trunk/src/modules/questsystem/QuestGUINode.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUINode.cc	(revision 5758)
+++ code/trunk/src/modules/questsystem/QuestGUINode.cc	(revision 5760)
@@ -160,5 +160,5 @@
             stream << this->window_->getName() << "/Details";
             const QuestDescription* description = this->item_->getDescription();
-            this->details_ = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/FrameWindow", stream.str());
+            this->details_ = this->gui_->getWindowManager()->createWindow("TaharezLook/FrameWindow", stream.str());
             this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7, 0),CEGUI::UDim(0.7, 0)));
             this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1, 0),CEGUI::UDim(0.1, 0)));
@@ -171,7 +171,7 @@
             //! Create a ScrollablePane.
             stream << "/Scrollable";
-            CEGUI::Window* window = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/ScrollablePane", stream.str());
-            window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -10),CEGUI::UDim(1.0, -26)));
-            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5),CEGUI::UDim(0, 26)));
+            CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("TaharezLook/ScrollablePane", stream.str());
+            window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -2*QuestGUINode::BORDER_WIDTH),CEGUI::UDim(1.0, -QuestGUINode::TITLE_HEIGHT)));
+            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, QuestGUINode::TITLE_HEIGHT)));
             this->details_->addChildWindow(window);
 
@@ -185,5 +185,5 @@
                 stream.str("");
                 stream << this->details_->getName() << "/Status";
-                CEGUI::Window* statusWindow = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText", stream.str());
+                CEGUI::Window* statusWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
                 window->addChildWindow(statusWindow);
                 std::string status = "";
@@ -204,16 +204,15 @@
                 statusWindow->setText(status);
                 statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-                statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -13),CEGUI::UDim(1.0, 0)));
+                statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
                 height = setHeight(statusWindow);
 
                 offset += height;
             }
-
-            //! Display the Description of the QuestItem.
+            
+            //! Create title pane for the description.
             stream.str("");
             stream << this->details_->getName() << "/Description";
-            CEGUI::Window* descriptionWindow = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText", stream.str());
             stream << "/Title";
-            CEGUI::Window* descriptionWindowTitle = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText", stream.str());
+            CEGUI::Window* descriptionWindowTitle = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
             window->addChildWindow(descriptionWindowTitle);
             descriptionWindowTitle->setProperty("HorzFormatting", "HorzCentred");
@@ -221,6 +220,12 @@
             descriptionWindowTitle->setText("Description:");
             descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-            descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -13),CEGUI::UDim(1.0, 0)));
+            descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+
             offset += setHeight(descriptionWindowTitle);
+
+            //! Display the Description of the QuestItem.
+            stream.str("");
+            stream << this->details_->getName() << "/Description";
+            CEGUI::Window* descriptionWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
             window->addChildWindow(descriptionWindow);
             descriptionWindow->setProperty("HorzFormatting", "WordWrapLeftAligned");
@@ -228,5 +233,5 @@
             descriptionWindow->setText(description->getDescription());
             descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-            descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -13),CEGUI::UDim(1.0, 0)));
+            descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
             height = setHeight(descriptionWindow);
 
@@ -241,9 +246,9 @@
                     if(dynamic_cast<QuestHint*>((*it)->item_) != NULL) //!< If the subNode belongs to a QuestHint.
                     {
-                        if(title)
+                        if(title) //!< If no title pane for the QuestHints has been created, create one.
                         {
                             stream.str("");
                             stream << this->details_->getName() << "/Hints/Title";
-                            CEGUI::Window* hintsTitle = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText", stream.str());
+                            CEGUI::Window* hintsTitle = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
                             window->addChildWindow(hintsTitle);
                             hintsTitle->setProperty("HorzFormatting", "HorzCentred");
@@ -251,14 +256,13 @@
                             hintsTitle->setText("Hints:");
                             hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-                            hintsTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -13),CEGUI::UDim(1.0, 0)));
+                            hintsTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
                             offset += setHeight(hintsTitle);;
                             title = false;
                         }
                         QuestGUINode* node = *it;
-                        node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -13),CEGUI::UDim(0, 30)));
+                        node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
                         node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-                        node->window_->setProperty("HorizontalAlignment", "Left"); // TODO: Get this working.
                         window->addChildWindow(node->window_);
-                        offset += 30;
+                        offset += QuestGUINode::BUTTON_HEIGHT;
                     }
                 }
@@ -280,5 +284,5 @@
         
         //CEGUI::Window* window = this->gui_->getRootWindow();
-        CEGUI::Window* window = CEGUI::WindowManager::getSingleton().getWindow("orxonox/QuestGUI/Background");
+        CEGUI::Window* window = this->gui_->getWindowManager()->getWindow("orxonox/QuestGUI/Background");
 
         if(window != NULL)
@@ -295,5 +299,5 @@
     {        
         //CEGUI::Window* window = this->gui_->getRootWindow();
-        CEGUI::Window* window = CEGUI::WindowManager::getSingleton().getWindow("orxonox/QuestGUI/Background");
+        CEGUI::Window* window = this->gui_->getWindowManager()->getWindow("orxonox/QuestGUI/Background");
         window->removeChildWindow(this->details_);
 
@@ -353,6 +357,6 @@
     void QuestGUINode::updatePosition(void)
     {
-        this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 20*this->depth_),CEGUI::UDim(0, 30*this->index_)));
-        this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, -20*this->depth_-13),CEGUI::UDim(0, 30)));
+        this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::INDENT_WIDTH*this->depth_),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT*this->index_)));
+        this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, -QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
     }
 
Index: code/trunk/src/modules/questsystem/QuestGUINode.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUINode.h	(revision 5758)
+++ code/trunk/src/modules/questsystem/QuestGUINode.h	(revision 5760)
@@ -58,5 +58,4 @@
             inline CEGUI::Window* getWindow(void)
                 { return this->window_; }
-            CEGUI::Window* getDetails(void); //!< Creates the details window.
 
             bool openDetails(const CEGUI::EventArgs& e); //!< Opens the details window for the Quest/QuestHint clicked on.
@@ -64,10 +63,11 @@
 
         private:
-            static CEGUI::Rect getStaticTextArea(const CEGUI::Window* window); //Helper method for setHeight(). Gets the StaticTextArea for an input CEGUI Window.
-            static int setHeight(CEGUI::Window* window); //Helper method to adjust the height of an input Window (of type StaticText) to the text it holds.
+            CEGUI::Window* getDetails(void); //!< Creates the details window.
 
             void initialize(void); //!< Initialize the object.
             void updatePosition(void); //!< Update the position list item.
             void createWindow(void); //!< Helper method to create the CEGUI Window the node.
+            static CEGUI::Rect getStaticTextArea(const CEGUI::Window* window); //Helper method for setHeight(). Gets the StaticTextArea for an input CEGUI Window.
+            static int setHeight(CEGUI::Window* window); //Helper method to adjust the height of an input Window (of type StaticText) to the text it holds.
 
             bool visible_; //!< Boolean determining the visibility of the node.
@@ -75,6 +75,6 @@
             QuestGUI* gui_; //!< The QuestGUI this node belongs to.
             QuestGUINode* parent_; //!< The parent node.
-            std::list<QuestGUINode*> subNodes_; //!< a list of all subnodes.
-            QuestItem* item_; //!<
+            std::list<QuestGUINode*> subNodes_; //!< A list of all subnodes.
+            QuestItem* item_; //!< QuestItem belonging to this node.
 
             int depth_; //!< The depth (resp. indentation) of this node in the list of Quests. (Irrelevant for QuestHints)
@@ -84,4 +84,11 @@
             CEGUI::Window* details_; //!< The details window of this node.
 
+            //! Some magic numbers
+            static const int TITLE_HEIGHT = 26;
+            static const int BORDER_WIDTH = 5;
+            static const int SCROLLBAR_WIDTH = 13;
+            static const int BUTTON_HEIGHT = 30;
+            static const int INDENT_WIDTH = 20;
+
     };
 
Index: code/trunk/src/modules/questsystem/QuestManager.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestManager.h	(revision 5758)
+++ code/trunk/src/modules/questsystem/QuestManager.h	(revision 5760)
@@ -65,6 +65,5 @@
 
             friend class ScopedSingleton<QuestManager, ScopeID::GSLevel>;
-            friend class QuestGUI; //TODO: better solution.
-            //friend std::map<std::string, Quest*> & QuestGUI::getQuests(void);
+            friend class QuestGUI;
 
         public:
@@ -94,5 +93,4 @@
             std::map<std::string, QuestHint*> hintMap_; //!< All QuestHints registered by their id's.
 
-            //TODO: Call destructor of QuestGUI's on destruction of QuestManager?
             std::map<PlayerInfo*, QuestGUI*> questGUIs_; //!< All GUI's registered by the players.
 
Index: code/trunk/src/modules/questsystem/notifications/NotificationManager.cc
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationManager.cc	(revision 5758)
+++ code/trunk/src/modules/questsystem/notifications/NotificationManager.cc	(revision 5760)
@@ -123,5 +123,5 @@
         this->listenerList_[listener] = index; //!< Add the NotificationListener to the list of listeners.
 
-        std::set<std::string> set = listener->getTargetsSet(); //TODO: Works this?
+        std::set<std::string> set = listener->getTargetsSet(); //TODO: Does this work?
 
         //! If all senders are the target of the listener, then the list of notification for that specific listener is te same as the list of all Notifications.
