Lets talk about this "getTemplateContext" pattern you're using when you get in.

I think we may be able to cut back the complexity and the number of lines of code.