Refactor the cloud calls