LUN-819 -- refactoring after code review