Cleaned up MetricTask and fixed AverageCalc