added a lock to game logic to protect some data structures. also minor improvements to the client