rework fix to move global variabls to optDefaults

Change-Id: I70303eb6c2587fe7c151e0737977d2e1802054cf
Merge "rework fix to move global variabls to optDefaults"