Pulled JavaScript code out of HTML file and into its own file.