Updated main cloud script