Modify code sytle. Improve efficiency by giving children the same allow(list) from parent.

Remove unwanted code. Modify some ugly code.
Improve the program by avoiding checking the split where their parent cannot split.