Changed how stats are collected and stored