tdb2: remove all the dead code