refactoring cloudify commands.