Refactor code to split out the printing of the metric definitions