Add client factories usable in both client and server settings.
Make it possible to have multiple clients, one for each incoming connection in a server setting.
Remove dead code