Minor changes to the Javascript