Refactor to support different ways to inject through setter