Refactoring.

Change-Id: I5c99876ff6fb5f22afcb2ed1545dcff654bfdbb2