Fixed the bug with infinite recursion when building a kd-tree
Scene now uses kd-trees for rendering triangles, still too slow