Extract JS to its own file.