refactored tratidef.jl
Started to use TypeVar but not there yet.  Seems to fail because of
https://github.com/JuliaLang/julia/issues/9043