more refactoring of dt

reduces coupling with back end