Minor: change def order
Make serializer factory with defs and not vals