fault tolerance for api, refactoring
Merge branch 'master' of https://github.com/peterfisher/mega.co.nz_sync_app