Created function to loading templates.