Changes to make Metric collection a bit more efficient. Other updates