Added MetricCollector class.