Improved template engine.