Changed the JS to make this a cordova module