Refractor a little bit

Indentation changes.
One bug fixed.