Refactor core serializer to load serializers by type, allowing for providing type-specific custom serializers.