LUN-368 -- refactoring after code review