Renamed templateExpander to expandTemplate.