fixes for syntax of generated JS.

These are all trivial fixes for warnings generated by tools like jshint.