Fixed some typos in code generation; updated minified pal.js.