CLOUDIFY-1808 refactoring