Rearranged, finished metric generation