Updated code to use Renderer rather than set of templates