Fixed the bug that broke the B-tree test. I've merged with the latest from your branch so pull request will hopefully be a clean merge.