Move the front end related routines from `Template` to `FrontendTemplate`