Added the new code

The new code for the game states etc..