refactoring: use config parameter in client constructor instead of long list of parameters