[minor] Make the cloud functions re-usable, so we could re-do the operation incase of failure
[minor] Make some routes cloud compatible