That seems reasonable, but I still like the idea of having DBDB pass a storage instance to BinaryTree - the abstraction seems cleaner there, letting you conceivably plug in different storage backends from DBDB.