more dynamic cast cleanup
more cleanup and rename 'typeparams' to 'tparams'(TemplateParameters ) - because they migth be constants, templates, (idents?) - not just types - although mostly hthey are.