optimized a little the template renderer
Merge pull request #171 from lexoyo/develop

optimized a little the template renderer