Moving js to a js file.