Change code style, and fix some problem occurred when drawing connection between parent and son.