Refactoring of aggregates to support serialization