Updated client to use config object itself

Added some tests