Add important validations. Improve the custom template structure.