Implementation of a Generic StateMachine to handle different types of states for example gamestate and uistate and some temporary test stuff