restructuring to add cordova stuff