[Serialization] Refactoring and decreased dependencies between components.