better server state handling, tweak to game loop