Separate javascript from index.html