Yes, the whole file. Templates are purely to support xmodule create operations. They seem an application tier not an xmodule tier function. We have a lot of functionality at the persistence tier, model tier, etc which seems like it should be in another tier such as app tier. Part of the problem is not having a clean definition of the architecture's tiers. In this case, my comment is an editorial.