moved wire protocol to its own package.
Also updated to support more of the values in the json.