Index: code/branches/gui/src/orxonox/gamestates/GSClient.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSClient.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSClient.cc	(revision 2817)
@@ -41,5 +41,5 @@
 
     GSClient::GSClient()
-        : GameState<GSGraphics>("client")
+        : GameState("client")
         , client_(0)
     {
Index: code/branches/gui/src/orxonox/gamestates/GSClient.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSClient.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSClient.h	(revision 2817)
@@ -31,11 +31,11 @@
 
 #include "OrxonoxPrereqs.h"
+#include "core/GameState.h"
 #include "network/NetworkPrereqs.h"
 #include "GSLevel.h"
-#include "GSGraphics.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSClient : public GameState<GSGraphics>, public GSLevel
+    class _OrxonoxExport GSClient : public GameState, public GSLevel
     {
     public:
Index: code/branches/gui/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSDedicated.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSDedicated.cc	(revision 2817)
@@ -41,5 +41,5 @@
 {
     GSDedicated::GSDedicated()
-        : GameState<GSRoot>("dedicated")
+        : GameState("dedicated")
         , server_(0)
         , timeSinceLastUpdate_(0)
Index: code/branches/gui/src/orxonox/gamestates/GSDedicated.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSDedicated.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSDedicated.h	(revision 2817)
@@ -31,11 +31,11 @@
 
 #include "OrxonoxPrereqs.h"
+#include "core/GameState.h"
 #include "network/NetworkPrereqs.h"
 #include "GSLevel.h"
-#include "GSRoot.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSDedicated : public GameState<GSRoot>, public GSLevel
+    class _OrxonoxExport GSDedicated : public GameState, public GSLevel
     {
     public:
Index: code/branches/gui/src/orxonox/gamestates/GSGUI.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSGUI.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSGUI.cc	(revision 2817)
@@ -40,5 +40,5 @@
 {
     GSGUI::GSGUI()
-        : GameState<GSGraphics>("gui")
+        : GameState("gui")
     {
     }
Index: code/branches/gui/src/orxonox/gamestates/GSGUI.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSGUI.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSGUI.h	(revision 2817)
@@ -32,9 +32,8 @@
 #include "OrxonoxPrereqs.h"
 #include "core/GameState.h"
-#include "GSGraphics.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSGUI : public GameState<GSGraphics>
+    class _OrxonoxExport GSGUI : public GameState
     {
     public:
Index: code/branches/gui/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSGraphics.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSGraphics.cc	(revision 2817)
@@ -44,12 +44,11 @@
 #include "overlays/console/InGameConsole.h"
 #include "gui/GUIManager.h"
-
-// for compatibility
 #include "GraphicsManager.h"
+#include "Game.h"
 
 namespace orxonox
 {
     GSGraphics::GSGraphics()
-        : GameState<GSRoot>("graphics")
+        : GameState("graphics")
         , inputManager_(0)
         , console_(0)
@@ -157,10 +156,6 @@
         uint64_t timeAfterTick = time.getRealMicroseconds();
 
-        // Also add our tick time to the list in GSRoot
-        this->getParent()->addTickTime(timeAfterTick - timeBeforeTick);
-
-        // Update statistics overlay. Note that the values only change periodically in GSRoot.
-        GraphicsManager::getInstance().setAverageFramesPerSecond(this->getParent()->getAvgFPS());
-        GraphicsManager::getInstance().setAverageTickTime(this->getParent()->getAvgTickTime());
+        // Also add our tick time
+        Game::getInstance().addTickTime(timeAfterTick - timeBeforeTick);
 
         this->graphicsManager_->update(time);
Index: code/branches/gui/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSGraphics.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSGraphics.h	(revision 2817)
@@ -34,9 +34,8 @@
 #include "core/OrxonoxClass.h"
 #include "tools/WindowEventListener.h"
-#include "GSRoot.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSGraphics : public GameState<GSRoot>, public WindowEventListener
+    class _OrxonoxExport GSGraphics : public GameState, public WindowEventListener
     {
         friend class ClassIdentifier<GSGraphics>;
Index: code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc	(revision 2817)
@@ -40,5 +40,5 @@
 {
     GSIOConsole::GSIOConsole()
-        : GameState<GSRoot>("ioConsole")
+        : GameState("ioConsole")
     {
     }
Index: code/branches/gui/src/orxonox/gamestates/GSIOConsole.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSIOConsole.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSIOConsole.h	(revision 2817)
@@ -33,9 +33,8 @@
 #include <OgrePrerequisites.h>
 #include "core/GameState.h"
-#include "GSRoot.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSIOConsole : public GameState<GSRoot>
+    class _OrxonoxExport GSIOConsole : public GameState
     {
     public:
Index: code/branches/gui/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSLevel.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSLevel.cc	(revision 2817)
@@ -53,5 +53,5 @@
 
     GSLevel::GSLevel()
-//        : GameState<GSGraphics>(name)
+//        : GameState(name)
         : keyBinder_(0)
         , inputState_(0)
Index: code/branches/gui/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSLevel.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSLevel.h	(revision 2817)
@@ -31,4 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
+#include "core/GameState.h"
 #include "core/OrxonoxClass.h"
 
Index: code/branches/gui/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSRoot.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSRoot.cc	(revision 2817)
@@ -33,9 +33,9 @@
 #include "util/Debug.h"
 #include "core/Core.h"
-#include "core/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/ConsoleCommand.h"
 #include "tools/Timer.h"
 #include "objects/Tickable.h"
+#include "Game.h"
 
 namespace orxonox
@@ -47,7 +47,4 @@
         , timeFactorPauseBackup_(1.0f)
     {
-        RegisterRootObject(GSRoot);
-        setConfigValues();
-
         this->ccSetTimeFactor_ = 0;
         this->ccPause_ = 0;
@@ -58,12 +55,4 @@
     }
 
-    void GSRoot::setConfigValues()
-    {
-        SetConfigValue(statisticsRefreshCycle_, 250000)
-            .description("Sets the time in microseconds interval at which average fps, etc. get updated.");
-        SetConfigValue(statisticsAvgLength_, 1000000)
-            .description("Sets the time in microseconds interval at which average fps, etc. gets calculated.");
-    }
-
     void GSRoot::enter()
     {
@@ -71,14 +60,7 @@
         timeFactor_ = 1.0f;
 
-        // reset frame counter
-        this->statisticsStartTime_ = 0;
-        this->statisticsTickTimes_.clear();
-        this->periodTickTime_ = 0;
-        this->avgFPS_ = 0.0f;
-        this->avgTickTime_ = 0.0f;
-
         {
             // add console commands
-            FunctorMember01<GameStateBase, const std::string&>* functor = createFunctor(&GameStateBase::requestState);
+            FunctorMember01<GameState, const std::string&>* functor = createFunctor(&GameState::requestState);
             functor->setObject(this);
             this->ccSelectGameState_ = createConsoleCommand(functor, "selectGameState");
@@ -144,38 +126,8 @@
         uint64_t timeAfterTick = time.getRealMicroseconds();
 
-        // STATISTICS
-        assert(timeAfterTick - timeBeforeTick >= 0 );
-        statisticsTickInfo tickInfo = {timeAfterTick, timeAfterTick - timeBeforeTick};
-        statisticsTickTimes_.push_back(tickInfo);
-        assert(statisticsTickTimes_.back().tickLength==tickInfo.tickLength);
-        this->periodTickTime_ += tickInfo.tickLength;
+        // Also add our tick time to the list in GSRoot
+        Game::getInstance().addTickTime(timeAfterTick - timeBeforeTick);
 
-        // Ticks GSGraphics or GSDedicated
         this->tickChild(time);
-
-        if (timeAfterTick > statisticsStartTime_ + statisticsRefreshCycle_)
-        {
-            std::list<statisticsTickInfo>::iterator it = this->statisticsTickTimes_.begin();
-            assert(it != this->statisticsTickTimes_.end());
-            int64_t lastTime = timeAfterTick - statisticsAvgLength_;
-            if ((int64_t)it->tickTime < lastTime)
-            {
-                do
-                {
-                    assert(this->periodTickTime_ > it->tickLength);
-                    this->periodTickTime_ -= it->tickLength;
-                    ++it;
-                    assert(it != this->statisticsTickTimes_.end());
-                } while ((int64_t)it->tickTime < lastTime);
-                this->statisticsTickTimes_.erase(this->statisticsTickTimes_.begin(), it);
-            }
-
-            uint32_t framesPerPeriod = this->statisticsTickTimes_.size();
-            this->avgFPS_ = (float)framesPerPeriod / (timeAfterTick - this->statisticsTickTimes_.front().tickTime) * 1000000.0;
-            this->avgTickTime_ = (float)this->periodTickTime_ / framesPerPeriod / 1000.0;
-
-            statisticsStartTime_ = timeAfterTick;
-        }
-
     }
 
Index: code/branches/gui/src/orxonox/gamestates/GSRoot.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSRoot.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSRoot.h	(revision 2817)
@@ -38,14 +38,9 @@
 namespace orxonox
 {
-    class _OrxonoxExport GSRoot : public RootGameState, public OrxonoxClass
+    class _OrxonoxExport GSRoot : public RootGameState
     {
         friend class ClassIdentifier<GSRoot>;
 
     public:
-        struct statisticsTickInfo
-        {
-            uint64_t    tickTime;
-            uint32_t    tickLength;
-        };
     
     public:
@@ -59,11 +54,4 @@
         float getTimeFactor() { return this->timeFactor_; }
 
-        float getAvgTickTime() { return this->avgTickTime_; }
-        float getAvgFPS()      { return this->avgFPS_; }
-
-        inline void addTickTime(uint32_t length)
-            { assert(!this->statisticsTickTimes_.empty()); this->statisticsTickTimes_.back().tickLength += length;
-              this->periodTickTime_+=length; }
-
     private:
         void enter();
@@ -71,21 +59,7 @@
         void ticked(const Clock& time);
 
-        void setConfigValues();
-
         float                 timeFactor_;       //!< A factor that sets the gamespeed. 1 is normal.
         bool                  bPaused_;
         float                 timeFactorPauseBackup_;
-
-        // variables for time statistics
-        uint64_t              statisticsStartTime_;
-        std::list<statisticsTickInfo>
-                              statisticsTickTimes_;
-        uint32_t              periodTickTime_;
-        float                 avgFPS_;
-        float                 avgTickTime_;
-
-        // config values
-        unsigned int          statisticsRefreshCycle_;
-        unsigned int          statisticsAvgLength_;
 
         // console commands
Index: code/branches/gui/src/orxonox/gamestates/GSServer.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSServer.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSServer.cc	(revision 2817)
@@ -39,5 +39,5 @@
 
     GSServer::GSServer()
-        : GameState<GSGraphics>("server")
+        : GameState("server")
         , server_(0)
     {
Index: code/branches/gui/src/orxonox/gamestates/GSServer.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSServer.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSServer.h	(revision 2817)
@@ -31,11 +31,11 @@
 
 #include "OrxonoxPrereqs.h"
+#include "core/GameState.h"
 #include "network/NetworkPrereqs.h"
 #include "GSLevel.h"
-#include "GSGraphics.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSServer : public GameState<GSGraphics>, public GSLevel
+    class _OrxonoxExport GSServer : public GameState, public GSLevel
     {
     public:
Index: code/branches/gui/src/orxonox/gamestates/GSStandalone.cc
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSStandalone.cc	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSStandalone.cc	(revision 2817)
@@ -40,5 +40,5 @@
 {
     GSStandalone::GSStandalone()
-        : GameState<GSGraphics>("standalone")
+        : GameState("standalone")
     {
     }
Index: code/branches/gui/src/orxonox/gamestates/GSStandalone.h
===================================================================
--- code/branches/gui/src/orxonox/gamestates/GSStandalone.h	(revision 2816)
+++ code/branches/gui/src/orxonox/gamestates/GSStandalone.h	(revision 2817)
@@ -31,10 +31,10 @@
 
 #include "OrxonoxPrereqs.h"
+#include "core/GameState.h"
 #include "GSLevel.h"
-#include "GSGraphics.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSStandalone : public GameState<GSGraphics>, public GSLevel
+    class _OrxonoxExport GSStandalone : public GameState, public GSLevel
     {
     public:
