Add r_bp_del_all (db-*) and fix some more bugs