Refactoring.

Change-Id: I5c99876ff6fb5f22afcb2ed1545dcff654bfdbb2
Merge pull request #1 from dayson/next

Refactoring.