Isolating the code to render the template

This should be a class :)
Using the new template method
Isolating template file name logic

Still not good
Making mode and ownership customizable

Now you can pass those as options or it will try
to get those informations from the context