Finalizing ctemplate