[DF-3293] Refactoring after review.