integerated from github
https://github.com/appcelerator-modules/ti.cloud
removed unnecessary