Remove dependencies on globals, ContextSource gets instead

Change-Id: I7577fcc6173be5c733f0ae5aad470e7392a090a9