Refactor to use Metric in every place instead of metric name string