Move scripts to head and location js to index.