Support of new 'client' mode and unit tests