fix some inconsistency of code formatting and indentations