Added main loop and the basic game state shape.