Edited octree so that that it runs. Needs testing.