Implement seriaalizable interface for the model classes