Leave number() routine as an example only
Mark error output as isMathJax
Fix some crashes when elements are missing their children.