Move JavaScript into a separate file.