Made the serializer configurable