Index: code/branches/presentation3/src/modules/questsystem/AddQuestHint.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/AddQuestHint.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/AddQuestHint.cc	(revision 6940)
@@ -85,5 +85,5 @@
     bool AddQuestHint::setHintId(const std::string & id)
     {
-        if(!QuestItem::isId(id))
+        if(id.compare(BLANKSTRING) == 0)
         {
             COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
Index: code/branches/presentation3/src/modules/questsystem/ChangeQuestStatus.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/ChangeQuestStatus.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/ChangeQuestStatus.cc	(revision 6940)
@@ -78,5 +78,5 @@
     bool ChangeQuestStatus::setQuestId(const std::string & id)
     {
-        if(!QuestItem::isId(id))
+        if(id.compare(BLANKSTRING) == 0)
         {
             COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
Index: code/branches/presentation3/src/modules/questsystem/Quest.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/Quest.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/Quest.cc	(revision 6940)
@@ -61,5 +61,6 @@
     Quest::~Quest()
     {
-
+        if(this->isRegistered())
+            QuestManager::getInstance().unregisterQuest(this);
     }
 
Index: code/branches/presentation3/src/modules/questsystem/Quest.h
===================================================================
--- code/branches/presentation3/src/modules/questsystem/Quest.h	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/Quest.h	(revision 6940)
@@ -104,5 +104,5 @@
             virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
             virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
-
+            
             bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest.
 
Index: code/branches/presentation3/src/modules/questsystem/QuestHint.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/QuestHint.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/QuestHint.cc	(revision 6940)
@@ -59,5 +59,6 @@
     QuestHint::~QuestHint()
     {
-
+        if(this->isRegistered())
+            QuestManager::getInstance().unregisterHint(this);
     }
 
Index: code/branches/presentation3/src/modules/questsystem/QuestItem.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/QuestItem.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/QuestItem.cc	(revision 6940)
@@ -46,4 +46,6 @@
     QuestItem::QuestItem(BaseObject* creator) : BaseObject(creator)
     {
+        this->registered_ = false;
+        
         RegisterObject(QuestItem);
     }
@@ -79,5 +81,5 @@
     void QuestItem::setId(const std::string & id)
     {
-        if(!isId(id)) //!< Checks whether the id is a valid id.
+        if(id.compare(BLANKSTRING) == 0) //!< Checks whether the id is a valid id.
         {
             COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
@@ -88,16 +90,3 @@
     }
 
-    /**
-    @brief
-        Checks whether an input id is of the required form.
-    @param id
-        The id to be checked.
-    @return
-        Returns true if the string is likely to be of the required form.
-    */
-    /*static*/ bool QuestItem::isId(const std::string & id)
-    {
-        return id.size() >= 32;
-    }
-
 }
Index: code/branches/presentation3/src/modules/questsystem/QuestItem.h
===================================================================
--- code/branches/presentation3/src/modules/questsystem/QuestItem.h	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/QuestItem.h	(revision 6940)
@@ -41,4 +41,5 @@
 #include <string>
 #include "core/BaseObject.h"
+#include "QuestManager.h"
 
 namespace orxonox
@@ -74,5 +75,15 @@
                 { return this->description_; }
 
-            static bool isId(const std::string & id); //!< Checks whether a given id is valid.
+            /**
+            @brief Check whether the QuestItem is registered with the QuestManager.
+            @return Returns true if the QuestItem is registered with the QuestManager.
+            */
+            inline bool isRegistered(void)
+                { return this->registered_; }
+            /**
+            @brief Set the QuestItem as being registered with the QuestManager.
+            */
+            inline void setRegistered(void)
+                { this->registered_ = true; }
 
         protected:
@@ -90,4 +101,6 @@
             QuestDescription* description_; //!< The QuestDescription of the QuestItem.
 
+            bool registered_;
+
     };
 
Index: code/branches/presentation3/src/modules/questsystem/QuestListener.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/QuestListener.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/QuestListener.cc	(revision 6940)
@@ -74,5 +74,6 @@
         XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
 
-        this->quest_->addListener(this); //!< Adds the QuestListener to the Quests list of listeners.
+        if(this->quest_ != NULL)
+            this->quest_->addListener(this); //!< Adds the QuestListener to the Quests list of listeners.
 
         COUT(3) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << std::endl;
Index: code/branches/presentation3/src/modules/questsystem/QuestManager.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/QuestManager.cc	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/QuestManager.cc	(revision 6940)
@@ -114,4 +114,5 @@
         if(result.second) //!< If inserting was a success.
         {
+            quest->setRegistered();
             COUT(3) << "Quest with questId {" << quest->getId() << "} successfully inserted." << std::endl;
             return true;
@@ -122,4 +123,13 @@
            return false;
         }
+    }
+
+    /**
+    @brief
+        Unregisters a Quest in the QuestManager.
+    */
+    bool QuestManager::unregisterQuest(Quest* quest)
+    {
+        return this->questMap_.erase(quest->getId()) == 1;
     }
 
@@ -146,4 +156,5 @@
         if(result.second) //!< If inserting was a success.
         {
+            hint->setRegistered();
             COUT(3) << "QuestHint with hintId {" << hint->getId() << "} successfully inserted." << std::endl;
             return true;
@@ -154,4 +165,13 @@
            return false;
         }
+    }
+
+    /**
+    @brief
+        Unregisters a QuestHint in the QuestManager.
+    */
+    bool QuestManager::unregisterHint(QuestHint* hint)
+    {
+        return this->hintMap_.erase(hint->getId()) == 1;
     }
 
@@ -169,5 +189,5 @@
     Quest* QuestManager::findQuest(const std::string & questId)
     {
-        if(!QuestItem::isId(questId)) //!< Check vor validity of the given id.
+        if(questId.compare(BLANKSTRING) == 1) //!< Check vor validity of the given id.
         {
             ThrowException(Argument, "Invalid questId.");
@@ -203,5 +223,5 @@
     QuestHint* QuestManager::findHint(const std::string & hintId)
     {
-        if(!QuestItem::isId(hintId)) //!< Check vor validity of the given id.
+        if(hintId.compare(BLANKSTRING) == 1) //!< Check vor validity of the given id.
         {
             ThrowException(Argument, "Invalid hintId.");
Index: code/branches/presentation3/src/modules/questsystem/QuestManager.h
===================================================================
--- code/branches/presentation3/src/modules/questsystem/QuestManager.h	(revision 6938)
+++ code/branches/presentation3/src/modules/questsystem/QuestManager.h	(revision 6940)
@@ -76,5 +76,7 @@
 
             bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager.
-            bool registerHint(QuestHint* quest); //!< Registers a QuestHint in the QuestManager.
+            bool unregisterQuest(Quest* quest); //!< Unregisters a Quest in the QuestManager.
+            bool registerHint(QuestHint* hint); //!< Registers a QuestHint in the QuestManager.
+            bool unregisterHint(QuestHint* hint); //!< Unregisters a QuestHint in the QuestManager.
 
             Quest* findQuest(const std::string & questId); //!< Returns the Quest with the input id.
