Some documentation fixes.

(this is mostly to get a commit in today, while I work on packaging
 the javascript in proper AMD modules :)