Use RequestContext instead of globals, as per code review.

Change-Id: I357c6060884fca40dd1e0895a593e3f35739e1f6