Tidy up, simplified the jsonClient, test passes now.