Index: /trunk/src/lib/event/event_def.h
===================================================================
--- /trunk/src/lib/event/event_def.h	(revision 8147)
+++ /trunk/src/lib/event/event_def.h	(revision 8148)
@@ -42,15 +42,17 @@
 //! this is an enumeration of all states of the event_handler/game
 typedef enum elState
-  {
-    ES_NULL         = -1,
-    ES_GAME         = 0,       //!< the state during the game plays
-    ES_GAME_MENU    = 1,       //!< state when the menu is called during game
-    ES_MENU         = 2,       //!< orxonox menu state
-    ES_SHELL        = 3,       //!< if we are in shell Modus
+{
+  ES_NULL         = -1,
+  ES_GAME         = 0,       //!< the state during the game plays
+  ES_GAME_MENU    = 1,       //!< state when the menu is called during game
+  ES_MENU         = 2,       //!< orxonox menu state
+  ES_SHELL        = 3,       //!< if we are in shell Modus
 
-    ES_ALL          = 4,       //!< you want to register events for all states
+  ES_ALL          = 4,       //!< you want to register events for all states
 
-    ES_NUMBER       = 5,       //!< the number of states
-  };
+  ES_NUMBER       = 5,       //!< the number of states
+};
+
+
 
 
Index: /trunk/src/lib/event/event_handler.cc
===================================================================
--- /trunk/src/lib/event/event_handler.cc	(revision 8147)
+++ /trunk/src/lib/event/event_handler.cc	(revision 8148)
@@ -21,4 +21,5 @@
 #include "event.h"
 #include "key_mapper.h"
+#include "key_names.h"
 
 #include "compiler.h"
@@ -62,4 +63,6 @@
 EventHandler::~EventHandler ()
 {
+  bool forgotToUnsubscribe = false;
+
   for(int i = 0; i < ES_NUMBER; ++i)
   {
@@ -68,8 +71,21 @@
       if(!this->listeners[i][j].empty())
       {
-        PRINTF(2)("forgot to unsubscribe an EventListener!\n");// %s!\n", this->listeners[i][j]->getName());
+        if (!forgotToUnsubscribe)
+        {
+          forgotToUnsubscribe = true;
+          PRINTF(2)("forgot to unsubscribe an EventListener!\n");// %s!\n", this->listeners[i][j]->getName());
+        }
       }
     }
   }
+
+  if (forgotToUnsubscribe)
+  {
+    PRINTF(2)("Listing still subscribed EventListeners\n");
+    PRINTF(2)("========================================\n");
+    this->debug();
+    PRINTF(2)("========================================\n");
+  }
+
   SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
 
@@ -485,4 +501,40 @@
 }
 
+
+/**
+ * @param state The State to get the Name of.
+ * @returns the Name of the State.
+ */
+const std::string& EventHandler::ELStateToString(elState state)
+{
+  if (state < ES_NUMBER)
+    return EventHandler::stateNames[state];
+  else
+    return EventHandler::stateNames[5];
+}
+
+/**
+ * @param stateName the Name of the State to retrieve.
+ * @return the State given by the name
+ */
+elState EventHandler::StringToELState(const std::string& stateName)
+{
+  for (unsigned int i = 0 ; i < ES_NUMBER; i++)
+    if (stateName == EventHandler::stateNames[i])
+      return (elState)i;
+  return ES_NULL;
+}
+
+const std::string  EventHandler::stateNames[] =
+{
+  "game",
+  "game_menu",
+  "menu",
+  "shell",
+  "all",
+  "unknown",
+};
+
+
 /**
  * @brief outputs some nice information about the EventHandler
@@ -497,5 +549,8 @@
     for(int j = 0; j < EV_NUMBER; ++j)
       for (unsigned int evl = 0; evl < this->listeners[i][j].size(); evl++)
-        PRINT(0)("Event %d of State %d subscribed to %s (%p)\n", j, i, this->listeners[i][j][evl]->getName(), this->listeners[i][j][evl]);
+        PRINT(0)("Event %s(%d) of State %s(%d) subscribed to %s (%p)\n",
+        EVToKeyName(j).c_str(), j,
+        ELStateToString((elState)i).c_str(), i,
+        this->listeners[i][j][evl]->getName(), this->listeners[i][j][evl]);
   }
   PRINT(0)("============================EH=\n");
Index: /trunk/src/lib/event/event_handler.h
===================================================================
--- /trunk/src/lib/event/event_handler.h	(revision 8147)
+++ /trunk/src/lib/event/event_handler.h	(revision 8148)
@@ -19,7 +19,8 @@
 
 //! The one Event Handler from Orxonox
-class EventHandler : public BaseObject {
+class EventHandler : public BaseObject
+{
 
- public:
+public:
   virtual ~EventHandler();
   /** @returns a Pointer to the only object of this Class */
@@ -29,5 +30,5 @@
   void setState(elState state);
   /** @returns the current state */
-  inline elState getState() const { return this->state; };
+inline elState getState() const { return this->state; };
 
   void pushState(elState state);
@@ -52,10 +53,16 @@
   void debug() const;
 
- private:
+  static const std::string& ELStateToString(elState state);
+  static elState StringToELState(const std::string& stateName);
+
+private:
   EventHandler();
 
   bool findListener(std::vector<EventListener*>::iterator* it, elState state, int eventType, EventListener* listener);
 
- private:
+public:
+  static const std::string     stateNames[];
+
+private:
   static EventHandler*         singletonRef;                    //!< the singleton reference
 
Index: /trunk/src/lib/event/key_names.h
===================================================================
--- /trunk/src/lib/event/key_names.h	(revision 8147)
+++ /trunk/src/lib/event/key_names.h	(revision 8148)
@@ -52,3 +52,4 @@
 std::string SDLKToKeyname( int key);
 
+
 #endif /* _KEY_NAMES_H */
Index: /trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.cc	(revision 8147)
+++ /trunk/src/lib/graphics/graphics_engine.cc	(revision 8148)
@@ -414,6 +414,4 @@
   this->setResolution(resizeInfo.w, resizeInfo.h, this->bitsPerPixel);
 }
-
-/**
 
 /**
Index: /trunk/src/lib/gui/gl/glgui_widget.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_widget.h	(revision 8147)
+++ /trunk/src/lib/gui/gl/glgui_widget.h	(revision 8148)
@@ -131,5 +131,5 @@
 
     /** @param the Event to process. @returns true if the Event has been consumed*/
-    virtual bool processEvent(const Event& event) { };
+    virtual bool processEvent(const Event& event) { return false; };
 
   protected:
Index: /trunk/src/lib/math/vector2D.h
===================================================================
--- /trunk/src/lib/math/vector2D.h	(revision 8147)
+++ /trunk/src/lib/math/vector2D.h	(revision 8148)
@@ -76,9 +76,9 @@
   inline const Vector2D& operator= (const Vector2D& v) { this->x = v.x; this->y = v.y; return *this; };
   /** copy constructor* @param v the sVec3D to assign to this vector. @returns the vector v */
-  inline const Vector2D& operator= (const sVec2D& v) { this->x = v[0]; this->y = v[1]; }
+  inline const Vector2D& operator= (const sVec2D& v) { this->x = v[0]; this->y = v[1]; return *this; }
   /** @param v: the other vector \return the dot product of the vectors */
   float dot (const Vector2D& v) const { return x*v.x+y*v.y; };
   /** @param v multipy each entry with each other @returns this reference */
-  const Vector2D& internalMultipy(const Vector2D& v) { this->x *= v.x; this->y *= y; };
+  const Vector2D& internalMultipy(const Vector2D& v) { this->x *= v.x; this->y *= y; return *this; };
   /** scales the this vector with v* @param v the vector to scale this with */
   void scale(const Vector2D& v) {   x *= v.x;  y *= v.y; };
Index: /trunk/src/lib/particles/quick_animation.h
===================================================================
--- /trunk/src/lib/particles/quick_animation.h	(revision 8147)
+++ /trunk/src/lib/particles/quick_animation.h	(revision 8148)
@@ -70,6 +70,6 @@
     //! compares this->position with position @param position pos to compare, @returns true on match.
     bool operator==(float position) { return this->position == position; };
+    float            position;          //!< The position of thies KeyFrame
     float            value;             //!< The value of this KeyFrame
-    float            position;          //!< The position of thies KeyFrame
 
     static bool sortPositionPredicate(const QuickKeyFrame& key1, const QuickKeyFrame& key2);
Index: /trunk/src/lib/util/file.h
===================================================================
--- /trunk/src/lib/util/file.h	(revision 8147)
+++ /trunk/src/lib/util/file.h	(revision 8148)
@@ -28,5 +28,5 @@
   File(const std::string& fileName);
   File(const File& file);
-  ~File();
+  virtual ~File();
   void setFileName(const std::string& fileName);
   File& operator=(const std::string& fileName);
Index: /trunk/src/lib/util/loading/factory.cc
===================================================================
--- /trunk/src/lib/util/loading/factory.cc	(revision 8147)
+++ /trunk/src/lib/util/loading/factory.cc	(revision 8148)
@@ -29,5 +29,5 @@
  */
 Factory::Factory (const std::string& factoryName, ClassID classID)
-  : className(factoryName), classID(classID)
+  : classID(classID), className(factoryName)
 {
   this->setClassID(CL_FACTORY, "Factory");
Index: /trunk/src/lib/util/loading/factory.h
===================================================================
--- /trunk/src/lib/util/loading/factory.h	(revision 8147)
+++ /trunk/src/lib/util/loading/factory.h	(revision 8148)
@@ -36,7 +36,4 @@
 #define CREATE_FACTORY(CLASS_NAME, CLASS_ID) \
     tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(#CLASS_NAME, CLASS_ID)
-
-// #define CREATE_DYNAMIC_FACTORY(CLASS_NAME, CLASS_ID) \
-//     tFactory<CLASS_NAME>* global_##CLASS_NAME##_Dynamic_Factory = new DynamicLoader<CLASS_NAME>(#CLASS_NAME, CLASS_ID)
 
 //! The Factory is a loadable object handler
Index: /trunk/src/util/state.h
===================================================================
--- /trunk/src/util/state.h	(revision 8147)
+++ /trunk/src/util/state.h	(revision 8148)
@@ -47,5 +47,5 @@
   static inline SkyBox* getSkyBox() { return State::skyBox; };
   /** @param skyBox the SkyBox */
-  static inline SkyBox* setSkyBox(SkyBox* skyBox) { State::skyBox = skyBox; };
+  static inline void setSkyBox(SkyBox* skyBox) { State::skyBox = skyBox; };
 
   //////////////////////
