Get rid of some ugly globals

Bug: 49066
Change-Id: Ie24ec666280d086109df97e2ae3a590051f59451
Merge "Get rid of some ugly globals"