Update demo and fix issue in recursive split for bsp trees