added app.js file
updated index file to include app.js and fixed errors