Moved javascript handling feelings from index.html into its own .js file