optimizations.

Change-Id: I8c08c4e0835403179e553d4879897cec5182a9a2