Add some comment and fix some js.