reformat

reformat and add comments

Signed-off-by: Lindell Xu <lxu@vetronicsltd.com.cn>