Improved transforms to need fewer document templates