Moves JS to scripts file