gather-templates functions now output compressed template structures