Refactor app.html into index.html

Required for phonegap compatibility.