Refactor into multiple methods (AverageCalculator)