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.
Merge pull request #89 from enyojs/syntaxfixes

BHV-15864: Fixed syntax errors

Reviewed-By: Aaron Tam (aaron.tam@lge.com)