Minor FIxes

Fixed bugs in the xdbf system, and started on an XDBF tool