Extracted JSON client functions into seperate package

Closes #317 
Any of these fields that are set in both `NewClient*` methods should be passed into the `newClient` function directly.