Additional modifications to the stats out to handle JSON.