Code refactor.
Code refactor.