Minor code refactor.