Refactoring for serializers