added jsonclientservice and fixed up unit tests