Added stats and refactored popup