Added a capability to instantiate services from factories (objects with __invoke() method).