Added some stats tracking.