Cleaned up qdb-tdb integration