Improve coding style

Tracing the codebase is somewhat difficult because the coding style is inconsistent.
I think that is better for improving coding style to make developer happy.

P.S. Code is modified by jsformat plugin for sublime text with a little manual