d3dxof: Group and simplify templates and objects in a cleaner manner.