Fix up formatting and move code out of inner loop #3532
Put the metrics reporter in libexec, not bin #3532