changed proc name
removed global variable, changed procedure name and made doc intelligible
changed proc name as per candlepin tasks proc name
changed virt? inline function and added a new line in if