Change to use external templates