Index: /code/branches/resource/src/core/Clock.h
===================================================================
--- /code/branches/resource/src/core/Clock.h	(revision 3365)
+++ /code/branches/resource/src/core/Clock.h	(revision 3366)
@@ -26,12 +26,4 @@
  *
  */
-
-/**
-    @file
-    @brief Declaration of the Core class.
-
-    The Core class is a singleton, only used to configure some variables
-    in the core through the config-file.
-*/
 
 #ifndef _Clock_H__
Index: /code/branches/resource/src/core/ConfigFileManager.cc
===================================================================
--- /code/branches/resource/src/core/ConfigFileManager.cc	(revision 3365)
+++ /code/branches/resource/src/core/ConfigFileManager.cc	(revision 3366)
@@ -42,5 +42,5 @@
     const char* const DEFAULT_CONFIG_FILE = "default.ini";
 
-    ConfigFileManager* ConfigFileManager::singletonRef_s = 0;
+    ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;
 
     SetConsoleCommandShortcutExtern(config).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
@@ -482,6 +482,4 @@
          : mininmalFreeType_(ConfigFileType::numberOfReservedTypes)
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
     }
 
@@ -490,7 +488,4 @@
         for(std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); )
             delete (it++)->second;
-
-        assert(singletonRef_s != 0);
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/ConfigFileManager.h
===================================================================
--- /code/branches/resource/src/core/ConfigFileManager.h	(revision 3365)
+++ /code/branches/resource/src/core/ConfigFileManager.h	(revision 3366)
@@ -38,4 +38,5 @@
 
 #include "util/OrxEnum.h"
+#include "util/Singleton.h"
 
 namespace orxonox
@@ -267,6 +268,7 @@
     // ConfigFileManager //
     ///////////////////////
-    class _CoreExport ConfigFileManager
-    {
+    class _CoreExport ConfigFileManager : public Singleton<ConfigFileManager>
+    {
+        friend class Singleton<ConfigFileManager>;
         public:
             ConfigFileManager();
@@ -305,6 +307,4 @@
             void updateConfigValues(ConfigFileType type);
 
-            static ConfigFileManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
-
         private:
             ConfigFileManager(const ConfigFileManager&);
@@ -315,5 +315,5 @@
             unsigned int mininmalFreeType_;
 
-            static ConfigFileManager* singletonRef_s;
+            static ConfigFileManager* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/core/Core.cc
===================================================================
--- /code/branches/resource/src/core/Core.cc	(revision 3365)
+++ /code/branches/resource/src/core/Core.cc	(revision 3366)
@@ -83,5 +83,5 @@
 {
     //! Static pointer to the singleton
-    Core* Core::singletonRef_s  = 0;
+    Core* Core::singletonPtr_s  = 0;
 
     SetCommandLineArgument(mediaPath, "").information("Path to the media/data files");
@@ -139,5 +139,5 @@
                 .callback(this, &CoreConfiguration::debugLevelChanged);
 
-            SetConfigValue(language_, Language::getLanguage().defaultLanguage_)
+            SetConfigValue(language_, Language::getInstance().defaultLanguage_)
                 .description("The language of the ingame text")
                 .callback(this, &CoreConfiguration::languageChanged);
@@ -179,5 +179,5 @@
         {
             // Read the translation file after the language was configured
-            Language::getLanguage().readTranslatedLanguageFile();
+            Language::getInstance().readTranslatedLanguageFile();
         }
 
@@ -252,15 +252,8 @@
         // Cleanup guard for external console commands that don't belong to an Identifier
         , consoleCommandDestroyer_(CommandExecutor::destroyExternalCommands)
+        , configuration_(new CoreConfiguration()) // Don't yet create config values!
         , bDevRun_(false)
         , bGraphicsLoaded_(false)
-        , configuration_(new CoreConfiguration()) // Don't yet create config values!
-    {
-        if (singletonRef_s != 0)
-        {
-            COUT(0) << "Error: The Core singleton cannot be recreated! Shutting down." << std::endl;
-            abort();
-        }
-        Core::singletonRef_s = this;
-
+    {
         // Parse command line arguments first
         CommandLine::parseCommandLine(cmdLine);
@@ -328,7 +321,4 @@
     Core::~Core()
     {
-        // Don't assign singletonRef_s with NULL! Recreation is not supported
-        // The is quite simply because of the pre-main code that uses heap allocation
-        // And we correctly deallocate these resources in this destructor.
     }
 
Index: /code/branches/resource/src/core/Core.h
===================================================================
--- /code/branches/resource/src/core/Core.h	(revision 3365)
+++ /code/branches/resource/src/core/Core.h	(revision 3366)
@@ -46,4 +46,5 @@
 #include "util/OutputHandler.h"
 #include "util/ScopeGuard.h"
+#include "util/Singleton.h"
 
 namespace orxonox
@@ -58,8 +59,11 @@
         The class provides information about the media, config and log path.
         It determines those by the use of platform specific functions.
+    @remark
+        You should only create this singleton once because it destroys the identifiers!
     */
-    class _CoreExport Core
+    class _CoreExport Core : public Singleton<Core>
     {
         typedef Loki::ScopeGuardImpl0<void (*)()> SimpleScopeGuard;
+        friend class Singleton<Core>;
 
         public:
@@ -81,6 +85,4 @@
             void loadGraphics();
             void unloadGraphics();
-
-            static Core& getInstance() { assert(Core::singletonRef_s); return *Core::singletonRef_s; }
 
             static int   getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All);
@@ -136,5 +138,5 @@
             bool                          bGraphicsLoaded_;
 
-            static Core* singletonRef_s;
+            static Core* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/core/GUIManager.cc
===================================================================
--- /code/branches/resource/src/core/GUIManager.cc	(revision 3365)
+++ /code/branches/resource/src/core/GUIManager.cc	(revision 3366)
@@ -87,5 +87,5 @@
     static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
 
-    GUIManager* GUIManager::singletonRef_s = 0;
+    GUIManager* GUIManager::singletonPtr_s = 0;
 
     /**
@@ -105,7 +105,4 @@
         , resourceProvider_(0)
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         using namespace CEGUI;
 
@@ -161,6 +158,4 @@
         // destroy our own tolua interfaces
         LuaBind::getInstance().closeToluaInterfaces(this->luaState_);
-
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/GUIManager.h
===================================================================
--- /code/branches/resource/src/core/GUIManager.h	(revision 3365)
+++ /code/branches/resource/src/core/GUIManager.h	(revision 3366)
@@ -45,4 +45,5 @@
 
 #include "util/OgreForwardRefs.h"
+#include "util/Singleton.h"
 #include "input/InputHandler.h"
 
@@ -60,6 +61,7 @@
         Those input events are then injected into CEGUI in Lua.
     */
-    class _CoreExport GUIManager : public InputHandler
+    class _CoreExport GUIManager : public Singleton<GUIManager>, public InputHandler
     {
+        friend class Singleton<GUIManager>;
     public:
         GUIManager(Ogre::RenderWindow* renderWindow);
@@ -73,6 +75,5 @@
         void setCamera(Ogre::Camera* camera);
 
-        static GUIManager& getInstance()    { assert(singletonRef_s); return *singletonRef_s; }
-        static GUIManager* getInstancePtr() { return singletonRef_s; }
+        static GUIManager* getInstancePtr() { return singletonPtr_s; }
 
     private:
@@ -99,5 +100,5 @@
         lua_State*               luaState_;         //!< Lua state, access point to the Lua engine
 
-        static GUIManager*       singletonRef_s;    //!< Singleton reference to GUIManager
+        static GUIManager*       singletonPtr_s;    //!< Singleton reference to GUIManager
 
     };
Index: /code/branches/resource/src/core/Game.cc
===================================================================
--- /code/branches/resource/src/core/Game.cc	(revision 3365)
+++ /code/branches/resource/src/core/Game.cc	(revision 3366)
@@ -62,5 +62,5 @@
 
     std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s;
-    Game* Game::singletonRef_s = 0;
+    Game* Game::singletonPtr_s = 0;
 
 
@@ -114,11 +114,4 @@
     Game::Game(const std::string& cmdLine)
     {
-        if (singletonRef_s != 0)
-        {
-            COUT(0) << "Error: The Game singleton cannot be recreated! Shutting down." << std::endl;
-            abort();
-        }
-        singletonRef_s = this;
-
         this->bAbort_ = false;
         bChangingState_ = false;
@@ -163,5 +156,4 @@
     Game::~Game()
     {
-        // Don't assign singletonRef_s with NULL! Recreation is not supported
     }
 
Index: /code/branches/resource/src/core/Game.h
===================================================================
--- /code/branches/resource/src/core/Game.h	(revision 3365)
+++ /code/branches/resource/src/core/Game.h	(revision 3366)
@@ -48,4 +48,5 @@
 
 #include "util/Debug.h"
+#include "util/Singleton.h"
 
 /**
@@ -75,7 +76,10 @@
     @brief
         Main class responsible for running the game.
+    @remark
+        You should only create this singleton once because it owns the Core class! (see remark there)
     */
-    class _CoreExport Game
+    class _CoreExport Game : public Singleton<Game>
     {
+        friend class Singleton<Game>;
         typedef std::vector<shared_ptr<GameState> > GameStateVector;
         typedef std::map<std::string, shared_ptr<GameState> > GameStateMap;
@@ -104,5 +108,4 @@
         template <class T>
         static bool declareGameState(const std::string& className, const std::string& stateName, bool bIgnoreTickTime, bool bConsoleMode);
-        static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
     private:
@@ -175,5 +178,5 @@
 
         static std::map<std::string, GameStateInfo> gameStateDeclarations_s;
-        static Game* singletonRef_s;        //!< Pointer to the Singleton
+        static Game* singletonPtr_s;        //!< Pointer to the Singleton
     };
 
Index: /code/branches/resource/src/core/GraphicsManager.cc
===================================================================
--- /code/branches/resource/src/core/GraphicsManager.cc	(revision 3365)
+++ /code/branches/resource/src/core/GraphicsManager.cc	(revision 3366)
@@ -83,5 +83,5 @@
     };
 
-    GraphicsManager* GraphicsManager::singletonRef_s = 0;
+    GraphicsManager* GraphicsManager::singletonPtr_s = 0;
 
     /**
@@ -98,7 +98,4 @@
         RegisterObject(GraphicsManager);
 
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         this->setConfigValues();
 
@@ -154,7 +151,4 @@
 
         delete this->ogreWindowEventListener_;
-
-        assert(singletonRef_s);
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/GraphicsManager.h
===================================================================
--- /code/branches/resource/src/core/GraphicsManager.h	(revision 3365)
+++ /code/branches/resource/src/core/GraphicsManager.h	(revision 3366)
@@ -42,4 +42,5 @@
 #include <string>
 #include <OgreLog.h>
+#include "util/Singleton.h"
 #include "OrxonoxClass.h"
 
@@ -50,6 +51,7 @@
         Graphics engine manager class
     */
-    class _CoreExport GraphicsManager : public OrxonoxClass, public Ogre::LogListener
+    class _CoreExport GraphicsManager : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener
     {
+        friend class Singleton<GraphicsManager>;
     public:
         GraphicsManager();
@@ -66,7 +68,4 @@
 
         void setCamera(Ogre::Camera* camera);
-
-        inline static GraphicsManager& getInstance()
-            { assert(singletonRef_s); return *singletonRef_s; }
 
     private:
@@ -107,5 +106,5 @@
         ConsoleCommand*     ccPrintScreen_;
 
-        static GraphicsManager* singletonRef_s;        //!< Pointer to the Singleton
+        static GraphicsManager* singletonPtr_s;        //!< Pointer to the Singleton
     };
 }
Index: /code/branches/resource/src/core/Language.cc
===================================================================
--- /code/branches/resource/src/core/Language.cc	(revision 3365)
+++ /code/branches/resource/src/core/Language.cc	(revision 3366)
@@ -89,5 +89,5 @@
     // ###############################
 
-    Language* Language::singletonRef_s = 0;
+    Language* Language::singletonPtr_s = 0;
 
     /**
@@ -96,7 +96,4 @@
     Language::Language()
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         this->defaultLanguage_ = "default";
         this->defaultLocalisation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
@@ -113,7 +110,4 @@
         for (std::map<std::string, LanguageEntry*>::iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
             delete (it->second);
-
-        assert(singletonRef_s);
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/Language.h
===================================================================
--- /code/branches/resource/src/core/Language.h	(revision 3365)
+++ /code/branches/resource/src/core/Language.h	(revision 3366)
@@ -37,8 +37,8 @@
     Usage:
      - Set the entry with the default string:
-       Language::getLanguage()->addEntry("label of the entry", "the string to translate");
+       Language::getInstance()->addEntry("label of the entry", "the string to translate");
 
      - Get the localisation of the entry in the configured language:
-       std::cout << Language::getLanguage()->getLocalisation("name of the entry") << std::endl;
+       std::cout << Language::getInstance()->getLocalisation("name of the entry") << std::endl;
 */
 
@@ -51,10 +51,11 @@
 #include <string>
 #include <cassert>
+#include "util/Singleton.h"
 
 #define AddLanguageEntry(label, fallbackstring) \
-    orxonox::Language::getLanguage().addEntry(label, fallbackstring)
+    orxonox::Language::getInstance().addEntry(label, fallbackstring)
 
 #define GetLocalisation(label) \
-    orxonox::Language::getLanguage().getLocalisation(label)
+    orxonox::Language::getInstance().getLocalisation(label)
 
 
@@ -112,6 +113,7 @@
     // ###############################
     //! The Language class manges the language files and entries and stores the LanguageEntry objects in a map.
-    class _CoreExport Language
+    class _CoreExport Language : public Singleton<Language>
     {
+        friend class Singleton<Language>;
         friend class CoreConfiguration;
 
@@ -120,5 +122,4 @@
             ~Language();
 
-            static Language& getLanguage() { assert(singletonRef_s); return *singletonRef_s; }
             void addEntry(const LanguageEntryLabel& label, const std::string& entry);
             const std::string& getLocalisation(const LanguageEntryLabel& label) const;
@@ -137,5 +138,5 @@
             std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their labels
 
-            static Language* singletonRef_s;
+            static Language* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/core/LuaBind.cc
===================================================================
--- /code/branches/resource/src/core/LuaBind.cc	(revision 3365)
+++ /code/branches/resource/src/core/LuaBind.cc	(revision 3366)
@@ -43,11 +43,8 @@
 namespace orxonox
 {
-  LuaBind* LuaBind::singletonRef_s = NULL;
+  LuaBind* LuaBind::singletonPtr_s = NULL;
 
   LuaBind::LuaBind()
   {
-    assert(LuaBind::singletonRef_s == 0);
-    LuaBind::singletonRef_s = this;
-
     this->includePath_ = Core::getMediaPathString();
 
@@ -75,7 +72,4 @@
   {
     this->closeToluaInterfaces(luaState_);
-
-    assert(singletonRef_s);
-    LuaBind::singletonRef_s = NULL;
   };
 
Index: /code/branches/resource/src/core/LuaBind.h
===================================================================
--- /code/branches/resource/src/core/LuaBind.h	(revision 3365)
+++ /code/branches/resource/src/core/LuaBind.h	(revision 3366)
@@ -45,11 +45,14 @@
 }
 
+#include "util/Singleton.h"
+
 // tolua_begin
 namespace orxonox
 {
-  class _CoreExport LuaBind
+  class _CoreExport LuaBind : public Singleton<LuaBind>
   {
+// tolua_end
+    friend class Singleton<LuaBind>;
 
-// tolua_end
     struct LoadS {
       const char *s;
@@ -61,5 +64,5 @@
       ~LuaBind();
 
-      inline static LuaBind& getInstance() { assert(singletonRef_s); return *LuaBind::singletonRef_s; } // tolua_export
+      static LuaBind& getInstance() { return Singleton<LuaBind>::getInstance(); } // tolua_export
 
     void loadFile(const std::string& filename, bool luaTags);
@@ -89,5 +92,5 @@
 
     private:
-      static LuaBind* singletonRef_s;
+      static LuaBind* singletonPtr_s;
 
       std::string luaSource_;
Index: /code/branches/resource/src/core/Shell.cc
===================================================================
--- /code/branches/resource/src/core/Shell.cc	(revision 3365)
+++ /code/branches/resource/src/core/Shell.cc	(revision 3366)
@@ -51,11 +51,8 @@
     SetConsoleCommandShortcut(OutputHandler, debug);
 
-    Shell* Shell::singletonRef_s = 0;
+    Shell* Shell::singletonPtr_s = 0;
 
     Shell::Shell()
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell);
         Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1);
@@ -92,5 +89,4 @@
         if (this->inputBuffer_)
             delete this->inputBuffer_;
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/Shell.h
===================================================================
--- /code/branches/resource/src/core/Shell.h	(revision 3365)
+++ /code/branches/resource/src/core/Shell.h	(revision 3366)
@@ -60,11 +60,10 @@
     };
 
-    class _CoreExport Shell : virtual public OrxonoxClass, public OutputBufferListener
+    class _CoreExport Shell : public Singleton<Shell>, virtual public OrxonoxClass, public OutputBufferListener
     {
+        friend class Singleton<Shell>;
         public:
             Shell();
             virtual ~Shell();
-
-            static Shell& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
             static void clearShell();
@@ -148,5 +147,5 @@
             ConfigFileType commandHistoryConfigFileType_;
 
-            static Shell* singletonRef_s;
+            static Shell* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/core/TclBind.cc
===================================================================
--- /code/branches/resource/src/core/TclBind.cc	(revision 3365)
+++ /code/branches/resource/src/core/TclBind.cc	(revision 3366)
@@ -46,10 +46,8 @@
     SetConsoleCommandShortcut(TclBind, bgerror);
 
-    TclBind* TclBind::singletonRef_s = 0;
+    TclBind* TclBind::singletonPtr_s = 0;
 
     TclBind::TclBind(const std::string& datapath)
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
         this->interpreter_ = 0;
         this->bSetTclDataPath_ = false;
@@ -61,5 +59,4 @@
         if (this->interpreter_)
             delete this->interpreter_;
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/TclBind.h
===================================================================
--- /code/branches/resource/src/core/TclBind.h	(revision 3365)
+++ /code/branches/resource/src/core/TclBind.h	(revision 3366)
@@ -34,14 +34,14 @@
 #include <cassert>
 #include <string>
+#include "util/Singleton.h"
 
 namespace orxonox
 {
-    class _CoreExport TclBind
+    class _CoreExport TclBind : public Singleton<TclBind>
     {
+        friend class Singleton<TclBind>;
         public:
             TclBind(const std::string& datapath);
             ~TclBind();
-
-            static TclBind& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
             static std::string tcl(const std::string& tclcode);
@@ -68,5 +68,5 @@
             bool bSetTclDataPath_;
 
-            static TclBind* singletonRef_s;
+            static TclBind* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/core/TclThreadManager.cc
===================================================================
--- /code/branches/resource/src/core/TclThreadManager.cc	(revision 3365)
+++ /code/branches/resource/src/core/TclThreadManager.cc	(revision 3366)
@@ -91,7 +91,4 @@
         RegisterRootObject(TclThreadManager);
 
-        assert(TclThreadManager::singletonPtr_s == 0);
-        TclThreadManager::singletonPtr_s = this;
-
         this->numInterpreterBundles_ = 0;
 
@@ -116,6 +113,4 @@
     TclThreadManager::~TclThreadManager()
     {
-        TclThreadManager::singletonPtr_s = 0;
-
         delete this->interpreterBundlesMutex_;
 //        delete this->mainInterpreterMutex_; // <-- temporary disabled to avoid crash if a thread is still actively queriyng
Index: /code/branches/resource/src/core/TclThreadManager.h
===================================================================
--- /code/branches/resource/src/core/TclThreadManager.h	(revision 3365)
+++ /code/branches/resource/src/core/TclThreadManager.h	(revision 3366)
@@ -37,4 +37,5 @@
 #include <string>
 
+#include "util/Singleton.h"
 #include "OrxonoxClass.h"
 
@@ -43,6 +44,7 @@
 namespace orxonox
 {
-    class _CoreExport TclThreadManager : public OrxonoxClass
+    class _CoreExport TclThreadManager : public Singleton<TclThreadManager>, public OrxonoxClass
     {
+        friend class Singleton<TclThreadManager>;
         friend class TclBind;
         friend _CoreExport void tclThread(TclInterpreterBundle* bundle, std::string command);
@@ -53,6 +55,4 @@
             TclThreadManager(Tcl::interpreter* interpreter);
             virtual ~TclThreadManager();
-
-            static TclThreadManager& getInstance() { assert(TclThreadManager::singletonPtr_s); return *TclThreadManager::singletonPtr_s; }
 
             static unsigned int      create();
Index: /code/branches/resource/src/core/input/InputManager.cc
===================================================================
--- /code/branches/resource/src/core/input/InputManager.cc	(revision 3365)
+++ /code/branches/resource/src/core/input/InputManager.cc	(revision 3366)
@@ -64,5 +64,5 @@
     InputHandler InputHandler::EMPTY;
 
-    InputManager* InputManager::singletonRef_s = 0;
+    InputManager* InputManager::singletonPtr_s = 0;
 
     //! Defines the |= operator for easier use.
@@ -93,7 +93,4 @@
         RegisterRootObject(InputManager);
 
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         CCOUT(4) << "Constructing..." << std::endl;
 
@@ -138,6 +135,6 @@
         }
 
+        CCOUT(4) << "Construction complete." << std::endl;
         internalState_ = Nothing;
-        CCOUT(4) << "Construction complete." << std::endl;
     }
 
@@ -297,5 +294,4 @@
 
         CCOUT(4) << "Destruction complete." << std::endl;
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/core/input/InputManager.h
===================================================================
--- /code/branches/resource/src/core/input/InputManager.h	(revision 3365)
+++ /code/branches/resource/src/core/input/InputManager.h	(revision 3366)
@@ -37,4 +37,5 @@
 #include <vector>
 
+#include "util/Singleton.h"
 #include "core/WindowEventListener.h"
 #include "InputState.h"
@@ -62,6 +63,7 @@
           If the OIS::InputManager or the Keyboard fail, an exception is thrown.
     */
-    class _CoreExport InputManager : public WindowEventListener
+    class _CoreExport InputManager : public Singleton<InputManager>, public WindowEventListener
     {
+        friend class Singleton<InputManager>;
     public:
         //! Represents internal states of the InputManager.
@@ -168,7 +170,4 @@
             { return this->oisInputManager_; }
 
-        //! Returns a reference to the singleton instance
-        static InputManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
-
     private: // functions
         // don't mess with a Singleton
@@ -211,5 +210,5 @@
         std::set<InputState*>               stateDestroyRequests_; //!< Requests to destroy a state
 
-        static InputManager*                singletonRef_s;        //!< Pointer reference to the singleton
+        static InputManager*                singletonPtr_s;        //!< Pointer reference to the singleton
     };
 }
Index: /code/branches/resource/src/orxonox/CameraManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/CameraManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/CameraManager.cc	(revision 3366)
@@ -42,12 +42,9 @@
 namespace orxonox
 {
-    CameraManager* CameraManager::singletonRef_s = 0;
+    CameraManager* CameraManager::singletonPtr_s = 0;
 
     CameraManager::CameraManager(Ogre::Viewport* viewport)
         : viewport_(viewport)
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         this->fallbackCamera_ = 0;
     }
@@ -55,7 +52,4 @@
     CameraManager::~CameraManager()
     {
-        assert(singletonRef_s != 0);
-        singletonRef_s = 0;
-
         if (this->fallbackCamera_)
             this->fallbackCamera_->getSceneManager()->destroyCamera(this->fallbackCamera_);
Index: /code/branches/resource/src/orxonox/CameraManager.h
===================================================================
--- /code/branches/resource/src/orxonox/CameraManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/CameraManager.h	(revision 3366)
@@ -41,9 +41,11 @@
 #include <list>
 #include "util/OgreForwardRefs.h"
+#include "util/Singleton.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport CameraManager
+    class _OrxonoxExport CameraManager : public Singleton<CameraManager>
     {
+            friend class Singleton<CameraManager>;
         public:
             CameraManager(Ogre::Viewport* viewport);
@@ -57,6 +59,5 @@
             void useCamera(Ogre::Camera* camera);
 
-            static CameraManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
-            static CameraManager* getInstancePtr() { return singletonRef_s; }
+            static CameraManager* getInstancePtr() { return singletonPtr_s; }
 
         private:
@@ -67,5 +68,5 @@
             Ogre::Camera*         fallbackCamera_;
 
-            static CameraManager* singletonRef_s;
+            static CameraManager* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/orxonox/LevelManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/LevelManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/LevelManager.cc	(revision 3366)
@@ -45,11 +45,8 @@
     SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
 
-    LevelManager* LevelManager::singletonRef_s = 0;
+    LevelManager* LevelManager::singletonPtr_s = 0;
 
     LevelManager::LevelManager()
     {
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         RegisterRootObject(LevelManager);
         this->setConfigValues();
@@ -64,6 +61,4 @@
     LevelManager::~LevelManager()
     {
-        assert(singletonRef_s != 0);
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/orxonox/LevelManager.h
===================================================================
--- /code/branches/resource/src/orxonox/LevelManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/LevelManager.h	(revision 3366)
@@ -35,4 +35,6 @@
 #include <list>
 #include <string>
+
+#include "util/Singleton.h"
 #include "core/OrxonoxClass.h"
 
@@ -42,6 +44,7 @@
     class _OrxonoxExport LevelManager
     // tolua_end
-        : public OrxonoxClass
+        : public Singleton<LevelManager>, public OrxonoxClass
     { // tolua_export
+            friend class Singleton<LevelManager>;
         public:
             LevelManager();
@@ -59,6 +62,6 @@
             std::string getAvailableLevelListItem(unsigned int index) const; //tolua_export
 
-            static LevelManager* getInstancePtr() { return singletonRef_s; }
-            static LevelManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } // tolua_export
+            static LevelManager* getInstancePtr() { return singletonPtr_s; }
+            static LevelManager& getInstance()    { return Singleton<LevelManager>::getInstance(); } // tolua_export
 
         private:
@@ -73,5 +76,5 @@
             std::string defaultLevelName_;
 
-            static LevelManager* singletonRef_s;
+            static LevelManager* singletonPtr_s;
     }; // tolua_export
 } // tolua_export
Index: /code/branches/resource/src/orxonox/PawnManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/PawnManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/PawnManager.cc	(revision 3366)
@@ -34,23 +34,18 @@
 namespace orxonox
 {
-    PawnManager* PawnManager::singletonRef_s = 0;
+    PawnManager* PawnManager::singletonPtr_s = 0;
 
     PawnManager::PawnManager()
     {
         RegisterRootObject(PawnManager);
-
-        assert(PawnManager::singletonRef_s == 0);
-        PawnManager::singletonRef_s = this;
     }
 
     PawnManager::~PawnManager()
     {
-        assert(PawnManager::singletonRef_s != 0);
-        PawnManager::singletonRef_s = 0;
     }
 
     void PawnManager::touch()
     {
-        if (!PawnManager::singletonRef_s)
+        if (!PawnManager::singletonPtr_s)
             new PawnManager();
     }
Index: /code/branches/resource/src/orxonox/PawnManager.h
===================================================================
--- /code/branches/resource/src/orxonox/PawnManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/PawnManager.h	(revision 3366)
@@ -31,10 +31,13 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "util/Singleton.h"
 #include "interfaces/Tickable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport PawnManager : public Tickable
+    class _OrxonoxExport PawnManager : protected Singleton<PawnManager>, public Tickable
     {
+            friend class Singleton<PawnManager>;
         public:
             static void touch();
@@ -46,5 +49,5 @@
             virtual ~PawnManager();
 
-            static PawnManager* singletonRef_s;
+            static PawnManager* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/orxonox/PlayerManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/PlayerManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/PlayerManager.cc	(revision 3366)
@@ -37,12 +37,9 @@
 namespace orxonox
 {
-    PlayerManager* PlayerManager::singletonRef_s = 0;
+    PlayerManager* PlayerManager::singletonPtr_s = 0;
 
     PlayerManager::PlayerManager()
     {
         RegisterRootObject(PlayerManager);
-
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
 
         this->getConnectedClients();
@@ -51,6 +48,4 @@
     PlayerManager::~PlayerManager()
     {
-        assert(singletonRef_s);
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/orxonox/PlayerManager.h
===================================================================
--- /code/branches/resource/src/orxonox/PlayerManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/PlayerManager.h	(revision 3366)
@@ -34,16 +34,15 @@
 #include <cassert>
 #include <map>
+#include "util/Singleton.h"
 #include "network/ClientConnectionListener.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport PlayerManager : public ClientConnectionListener
+    class _OrxonoxExport PlayerManager : public Singleton<PlayerManager>, public ClientConnectionListener
     {
+            friend class Singleton<PlayerManager>;
         public:
             PlayerManager();
             virtual ~PlayerManager();
-
-            inline static PlayerManager& getInstance()
-                { assert(singletonRef_s); return *singletonRef_s; }
 
             PlayerInfo* getClient(unsigned int clientID) const;
@@ -57,5 +56,5 @@
             std::map<unsigned int, PlayerInfo*> clients_;
 
-            static PlayerManager* singletonRef_s;
+            static PlayerManager* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/orxonox/objects/pickup/BaseItem.h
===================================================================
--- /code/branches/resource/src/orxonox/objects/pickup/BaseItem.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/objects/pickup/BaseItem.h	(revision 3366)
@@ -51,8 +51,5 @@
             Daniel 'Huty' Haggenmueller
     */
-    class _OrxonoxExport BaseItem
-// tolua_end
-        : public BaseObject
-// tolua_begin
+    class _OrxonoxExport BaseItem : public BaseObject
     {
 // tolua_end
Index: /code/branches/resource/src/orxonox/objects/pickup/PickupInventory.h
===================================================================
--- /code/branches/resource/src/orxonox/objects/pickup/PickupInventory.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/objects/pickup/PickupInventory.h	(revision 3366)
@@ -43,10 +43,8 @@
 namespace orxonox
 {
-// tolua_end
     /**
         @brief Static class for the inventory GUI window.
         @author Daniel 'Huty' Haggenmueller
     */
-// tolua_begin
     class _OrxonoxExport PickupInventory
     {
Index: /code/branches/resource/src/orxonox/objects/quest/QuestDescription.h
===================================================================
--- /code/branches/resource/src/orxonox/objects/quest/QuestDescription.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/objects/quest/QuestDescription.h	(revision 3366)
@@ -54,8 +54,7 @@
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport QuestDescription
+    class _OrxonoxExport QuestDescription : public BaseObject
+    {
 // tolua_end
-        : public BaseObject
-    { // tolua_export
         public:
             QuestDescription(BaseObject* creator);
Index: /code/branches/resource/src/orxonox/objects/quest/QuestManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/objects/quest/QuestManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/objects/quest/QuestManager.cc	(revision 3366)
@@ -47,5 +47,5 @@
 {
     //! Pointer to the current (and single) instance of this class.
-    /*static*/ QuestManager* QuestManager::singletonRef_s = NULL;
+    /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL;
 
     /**
@@ -58,7 +58,4 @@
     {
         RegisterRootObject(QuestManager);
-
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
     }
 
@@ -70,16 +67,4 @@
     {
 
-    }
-
-    /**
-    @brief
-        Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with.
-    @return
-        Returns a reference to the single instance of the Quest Manager.
-    */
-    /*static*/ QuestManager & QuestManager::getInstance()
-    {
-        assert(singletonRef_s);
-        return *singletonRef_s;
     }
 
Index: /code/branches/resource/src/orxonox/objects/quest/QuestManager.h
===================================================================
--- /code/branches/resource/src/orxonox/objects/quest/QuestManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/objects/quest/QuestManager.h	(revision 3366)
@@ -40,4 +40,6 @@
 #include <map>
 #include <string>
+
+#include "util/Singleton.h"
 #include "core/OrxonoxClass.h"
 
@@ -71,15 +73,14 @@
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport QuestManager
-// tolua_end
-        : public OrxonoxClass
-// tolua_begin
+    class _OrxonoxExport QuestManager : public Singleton<QuestManager>, public orxonox::OrxonoxClass
     {
 // tolua_end
+            friend class Singleton<QuestManager>;
         public:
             QuestManager();
             virtual ~QuestManager();
 
-            static QuestManager& getInstance(); // tolua_export //!< Returns a reference to the single instance of the Quest Manager.
+            //! Returns a reference to the single instance of the Quest Manager.
+            static QuestManager& getInstance() { return Singleton<QuestManager>::getInstance(); } // tolua_export
 
             bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager.
@@ -92,5 +93,5 @@
 
         private:
-            static QuestManager* singletonRef_s;
+            static QuestManager* singletonPtr_s;
 
             std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
Index: /code/branches/resource/src/orxonox/overlays/console/InGameConsole.cc
===================================================================
--- /code/branches/resource/src/orxonox/overlays/console/InGameConsole.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/overlays/console/InGameConsole.cc	(revision 3366)
@@ -60,5 +60,5 @@
     SetConsoleCommand(InGameConsole, closeConsole, true);
 
-    InGameConsole* InGameConsole::singletonRef_s = 0;
+    InGameConsole* InGameConsole::singletonPtr_s = 0;
 
     /**
@@ -76,7 +76,4 @@
         RegisterObject(InGameConsole);
 
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
-
         this->bActive_ = false;
         this->cursor_ = 0.0f;
@@ -131,6 +128,4 @@
         if (this->consoleOverlay_)
             Ogre::OverlayManager::getSingleton().destroy(consoleOverlay_);
-
-        singletonRef_s = 0;
     }
 
Index: /code/branches/resource/src/orxonox/overlays/console/InGameConsole.h
===================================================================
--- /code/branches/resource/src/orxonox/overlays/console/InGameConsole.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/overlays/console/InGameConsole.h	(revision 3366)
@@ -34,5 +34,7 @@
 
 #include <string>
+
 #include "util/OgreForwardRefs.h"
+#include "util/Singleton.h"
 #include "core/Shell.h"
 #include "core/WindowEventListener.h"
@@ -40,6 +42,7 @@
 namespace orxonox
 {
-    class _OrxonoxExport InGameConsole : public ShellListener, public WindowEventListener
+    class _OrxonoxExport InGameConsole : public Singleton<InGameConsole>, public ShellListener, public WindowEventListener
     {
+        friend class Singleton<InGameConsole>;
     public: // functions
         InGameConsole();
@@ -51,7 +54,4 @@
 
         void update(const Clock& time);
-
-        static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
-        static InGameConsole* getInstancePtr() { return singletonRef_s; }
 
         static void openConsole();
@@ -112,5 +112,5 @@
         bool bHidesAllInput_;
 
-        static InGameConsole* singletonRef_s;
+        static InGameConsole* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/orxonox/overlays/notifications/NotificationManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 3366)
@@ -46,5 +46,5 @@
     const std::string NotificationManager::NONE = "none";
 
-    NotificationManager* NotificationManager::singletonRef_s = NULL;
+    NotificationManager* NotificationManager::singletonPtr_s = NULL;
 
     /**
@@ -55,7 +55,4 @@
     {
         RegisterRootObject(NotificationManager);
-
-        assert(singletonRef_s == 0);
-        singletonRef_s = this;
 
         this->highestIndex_ = 0;
@@ -70,16 +67,4 @@
     }
 
-    /**
-    @brief
-        Returns the current (and single) instance of the NotificationManager. Creates one, if there isn't one to begin with.
-    @return
-        Returns a reference to the single instance of the NotificationManager.
-    */
-    /*static*/ NotificationManager & NotificationManager::getInstance()
-    {
-        assert(singletonRef_s);
-        return *singletonRef_s;
-    }
-    
     /**
     @brief
Index: /code/branches/resource/src/orxonox/overlays/notifications/NotificationManager.h
===================================================================
--- /code/branches/resource/src/orxonox/overlays/notifications/NotificationManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/overlays/notifications/NotificationManager.h	(revision 3366)
@@ -40,4 +40,6 @@
 #include <map>
 #include <string>
+
+#include "util/Singleton.h"
 #include "core/OrxonoxClass.h"
 
@@ -52,6 +54,7 @@
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport NotificationManager : public OrxonoxClass
+    class _OrxonoxExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
     {
+            friend class Singleton<NotificationManager>;
         public:
             NotificationManager();
@@ -60,6 +63,4 @@
             static const std::string ALL;
             static const std::string NONE;
-
-            static NotificationManager & getInstance(); //! Returns a reference to the single instance of the NotificationManager.
 
             bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
@@ -88,5 +89,5 @@
 
         private:
-            static NotificationManager* singletonRef_s;
+            static NotificationManager* singletonPtr_s;
 
             int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
Index: /code/branches/resource/src/orxonox/sound/SoundManager.cc
===================================================================
--- /code/branches/resource/src/orxonox/sound/SoundManager.cc	(revision 3365)
+++ /code/branches/resource/src/orxonox/sound/SoundManager.cc	(revision 3366)
@@ -38,5 +38,5 @@
 namespace orxonox
 {
-    SoundManager* SoundManager::singletonRef_s = NULL;
+    SoundManager* SoundManager::singletonPtr_s = NULL;
 
     /**
@@ -45,7 +45,4 @@
     SoundManager::SoundManager()
     {
-        assert(singletonRef_s == NULL);
-        singletonRef_s = this;
-
         this->device_ = NULL;
         this->soundavailable_ = true;
@@ -93,7 +90,4 @@
     SoundManager::~SoundManager()
     {
-        assert(singletonRef_s != NULL);
-        singletonRef_s = NULL;
-
         alcDestroyContext(this->context_);
         alcCloseDevice(this->device_);
Index: /code/branches/resource/src/orxonox/sound/SoundManager.h
===================================================================
--- /code/branches/resource/src/orxonox/sound/SoundManager.h	(revision 3365)
+++ /code/branches/resource/src/orxonox/sound/SoundManager.h	(revision 3366)
@@ -32,4 +32,5 @@
 #include <cassert>
 #include <list>
+#include "util/Singleton.h"
 #include "interfaces/Tickable.h"
 
@@ -42,6 +43,7 @@
      *
      */
-    class _OrxonoxExport SoundManager : public Tickable 
+    class _OrxonoxExport SoundManager : public Singleton<SoundManager>, public Tickable
     {
+        friend class Singleton<SoundManager>;
     public:
         SoundManager();
@@ -52,6 +54,4 @@
         bool isSoundAvailable();
 
-        static SoundManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
-
     private:
         ALCdevice* device_;
@@ -60,5 +60,5 @@
         bool soundavailable_;
 
-        static SoundManager* singletonRef_s;
+        static SoundManager* singletonPtr_s;
     }; // class SoundManager
 } // namespace orxonox
Index: /code/branches/resource/src/util/SignalHandler.cc
===================================================================
--- /code/branches/resource/src/util/SignalHandler.cc	(revision 3365)
+++ /code/branches/resource/src/util/SignalHandler.cc	(revision 3366)
@@ -41,5 +41,5 @@
 namespace orxonox
 {
-    SignalHandler* SignalHandler::singletonRef_s = NULL;
+    SignalHandler* SignalHandler::singletonPtr_s = NULL;
 }
 
@@ -122,5 +122,5 @@
       }
       // if the signalhandler has already been destroyed then don't do anything
-      if( SignalHandler::singletonRef_s == 0 )
+      if( SignalHandler::singletonPtr_s == 0 )
       {
         COUT(0) << "recieved signal " << sigName.c_str() << std::endl << "can't write backtrace because SignalHandler already destroyed" << std::endl;
Index: /code/branches/resource/src/util/SignalHandler.h
===================================================================
--- /code/branches/resource/src/util/SignalHandler.h	(revision 3365)
+++ /code/branches/resource/src/util/SignalHandler.h	(revision 3366)
@@ -40,4 +40,5 @@
 #include <list>
 #include <string>
+#include "Singleton.h"
 
 namespace orxonox
@@ -67,10 +68,10 @@
     typedef std::list<SignalCallbackRec> SignalCallbackList;
 
-    class SignalHandler
+    class SignalHandler : public Singleton<SignalHandler>
     {
+        friend class Singleton<SignalHandler>;
     public:
-        SignalHandler()  { assert(SignalHandler::singletonRef_s == 0); SignalHandler::singletonRef_s = this; }
-        ~SignalHandler() { assert(SignalHandler::singletonRef_s != 0); SignalHandler::singletonRef_s = NULL; }
-        inline static SignalHandler& getInstance() { assert(SignalHandler::singletonRef_s); return *SignalHandler::singletonRef_s; }
+        SignalHandler()  { }
+        ~SignalHandler() { }
 
         void registerCallback( SignalCallback cb, void * someData );
@@ -87,5 +88,5 @@
         SignalCallbackList callbackList;
 
-        static SignalHandler* singletonRef_s;
+        static SignalHandler* singletonPtr_s;
 
         std::string appName;
@@ -98,10 +99,10 @@
 namespace orxonox
 {
-    class _UtilExport SignalHandler
+    class _UtilExport SignalHandler : public Singleton<SignalHandler>
     {
+        friend class Singleton<SignalHandler>;
     public:
-        SignalHandler()  { assert(SignalHandler::singletonRef_s == 0); SignalHandler::singletonRef_s = this; }
-        ~SignalHandler() { assert(SignalHandler::singletonRef_s != 0); SignalHandler::singletonRef_s = 0; }
-        inline static SignalHandler& getInstance() { assert(SignalHandler::singletonRef_s); return *SignalHandler::singletonRef_s; }
+        SignalHandler()  { }
+        ~SignalHandler() { }
         void doCatch( const std::string & appName, const std::string & filename ) {}
         void dontCatch() {}
@@ -109,5 +110,5 @@
 
     private:
-        static SignalHandler* singletonRef_s;
+        static SignalHandler* singletonPtr_s;
     };
 }
Index: /code/branches/resource/src/util/Singleton.h
===================================================================
--- /code/branches/resource/src/util/Singleton.h	(revision 3365)
+++ /code/branches/resource/src/util/Singleton.h	(revision 3366)
@@ -40,6 +40,6 @@
         Usage:
         Inherit publicly from Singleton<MyClass> and provide access to
-        MyClass::singletonRef_s.
-        This can be done with a friend declaration.
+        MyClass::singletonPtr_s.
+        This can easily be done with a friend declaration.
     */
     template <class T>
@@ -50,20 +50,21 @@
         static T& getInstance()
         {
-            assert(T::singletonRef_s != NULL);
-            return *T::singletonRef_s;
+            assert(T::singletonPtr_s != NULL);
+            return *T::singletonPtr_s;
         }
 
     protected:
-        // Constructor sets the singleton instance pointer
+        //! Constructor sets the singleton instance pointer
         Singleton()
         {
-            assert(T::singletonRef_s == NULL);
-            T::singletonRef_s = static_cast<T*>(this);
+            assert(T::singletonPtr_s == NULL);
+            T::singletonPtr_s = static_cast<T*>(this);
         }
-        // Constructor resets the singleton instance pointer
+
+        //! Constructor resets the singleton instance pointer
         ~Singleton()
         {
-            assert(T::singletonRef_s != NULL);
-            T::singletonRef_s = NULL;
+            assert(T::singletonPtr_s != NULL);
+            T::singletonPtr_s = NULL;
         }
 
