Updating JS - minor improvements