Add Octree and small bug fixes for QuadTree.