Fixed printing ugliness added as_json to objects.
Refactor to break out classes.