Can't we just add the class at the outer level, rather than passing it as an arg (e.g. remove extra_class from append_text, rather than adding it to all)?

```javascript
var el = this.append_text(s, {}, toinsert);
el.addClass("output_pyerr");
```