minor changes in template engine and examples