StateManager Implemented

Added code neccessary to use the states.
Moved most of the code from Engine to GameStateA