BHV-15864: Fixed syntax errors

Fixed syntax errors revealed by compiling these with the Google Closure Compiler. Basically, there were a few reserved words used as variable names, and some extraneous commas.