Reworks statistics calculations to improve execution speed significantly.