Add support for serializing all model and class fields

Addresses issue #6 .