Move JavaScript to separate file.