Add missing code for Metrics and PV/PVC elimination