Remove all references to JSON but one, move wire protocol