Fix a bunch of annotation issues and bugs

They are found by a partial Closure Compilter scan and jshint scan.
Merge pull request #50 from Obvious/xiao-fix-bunch

Fix a bunch of annotation issues and bugs