Improved template markup