Simplifying index.js by extracting core/wrapHTMLError.js