Add missing stubs to composer.json.
Refactoring ClientFactory.