Restructure of cordova app