Make template service provider configurable via constructor