Statistics Calculation moved to separate files