Split index.html script into index.js

For easier editing