Code cleanup in serialization types