Remove unnecessary variable definitions in GetDefectPayload