converted Injector.asSingleton to be a static method