#JC-1428 Refactoring after code review.