Creating models and customizing serialization