Added screen transitions between different states

Improved the game loop so it is controlled by delta time