Created new macro to return PerfMon instance name
Some code changes to tidy and performance