Updated octree code.