Hi, don't want to step on anyone's toes. But since the 4.0 updates... step 3 b) is....
Stick this at the top of the this.AddText = function(textStr,onFinishHandler) function:
//tracery expand the text textStr = grammar.flatten(textStr).replace(/\s+/g, ' ');
Cheers and thanks for this great tutorial. Hope this helps.