Converted stat system to use json