clean up app.js and add offline.appcache for db. Still need a fallback for css when no internet connection (rdudleyiii)