Initial working version of DT with working linking algorithm