add config to client
fixup! temp - memory management
memory leaks fix on client and tests
draft