CLOUDIFY-2531 refactoring