Bugid 98408 wm

Couple of things refactored