First changes.
Updated template engine code.