After testing found that in-line javascript is discouraged due to security policy settings, so split that into a separate file.