CAAERS-6596, apply refatoring recommended in code review.