Get rid of some ugly globals

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