moved testing for bplus to common tree code
combined most of the testing