Reduce scope levels.

Change-Id: I64684a80c79c3c7f5a8f23b07703fbcee3fe5887
Simplify.

Change-Id: Id7826839a6177532bb4c3885e798ac5feb95eaca