Added new functions related to templates.