Move some template-related methods to <template>.
Temporary change for Sauce.