Rename the global variable `out` to `gOut` so that one can easier realize it is a global variable.
Fix some comment problem.