Code refactor.