Change to new style classes for easier to_json() method.