style changes for utilities. Update nameMetric to avoid leaking globals