Template and context enhancements