Loose octree optimization and bug correction.
New algorithm used, there are still some modifications to do to optimize it.