Reworked the stats function to be one function
Still todo the reports into this function so that all stats across site are truly one function for DRY