Added tests for RandomSampleOctree and minor bugs.