Some refactoring and player can now leave lobby