Cordova Fix, Preferences

* Moved Cordova.js to load before the app, which lets the cordova
events fire correctly.
* Started building out the preliminary preferences management.