Refactors to support more data encodings

Refactored the JSON only operation into a base, a raw, and a JSON
operation. In addition, a few fixes to deal with registering
operations for a given class.