Added flag to turn octree on and off.
Merge