CLOUDIFY-2318 apply refactoring after based on code review