added code for dbd. No idea if it works, but it compiles. Had to hack the typedef struct Bundle to allow it to refer to itself.