Added a class for gathering statistics during run time.