Refactor serializers, add generators