Fixed syntax errors reported by closure compiler

* "final" is a reserved word in in es>=3 (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words)
* Closure compiler does not like trailing commas in object literals. From the so discussion http://stackoverflow.com/questions/7246618/trailing-commas-in-javascript, It seems like trailing commas are allowed in es5, but ie<=8 and closure compiler don't not like them