Refator the metrics.