Instead of many arrays, pass kd-node data as structs. CL code is a little cleaner, but also took a (very) little hit to the performance.