template->generateTemplate is also no longer static