wip
still a long way to go...
complete code reorg
Merge branch 'btree_iface_cleanup' into develop