Normalize the templateData