Refactoring after code review.