Refactor in detail.