finished serialization classes refactoring