Modified index.html to work with external resources and refactored the phonegap build