Move js out of index.html