CLOUDIFY-2350 refactoring