Revised stats architecture and added stats UI