Fixing some issues pointed by closure-compiler