refactor: remove all js code from index.html to js/app.js