Added some simple template processing.