Renamed split and collapse attribute update functions to update_split and update_collapse.
More clean up in collapse function.
Yet more clean up in the collapse function.
Final clean up + speed up of collapse function.