moved app to new file and added explanation to index.html