No more ugly dyncasts
Updated to follow ugdk3d
Trying not to double free stuff