Modified the object structure to be JSON.

I've changed some of the structure of the object_model to be more JSON friendly.