Implemented stats gague
Refactored code.