Remove extraneous code from serializer class