Added saveToCloud function.