Restructuring in preparation for BVH