Moved the js to its own external file for better organization.