Changes to JS error message display (incomplete but affects various files)