cleaner EndGamePopup code