cleanup code
use DTC_KIND enum type where appropriate