cleanup codes for bptree template
prepare to roll