Reduce dependence upon global objects

Change-Id: I875029e9cc65fa93b7bf069dd84cdf68ff94414c
Merge "Reduce dependence upon global objects"