Moved templates rendering stuff to the Renderer class.