Source code format change: Indent now 2 spaces from tab, and some refactoring.

Signed-off-by: nanashi <nanashi.hatch@gmail.com>