Improved template annotations