Re-arranging some things in btree.rs to accommodate testing.