Fixing/updating some JavaScript.