update source code.

improve source code for easy reading.