Added a MetricsCalculator to calculate all metrics. Updated
AnalyticsServiceImpl accordingly.