Updated Cordova 2.7, App ID
refactored code