Remove unused & single-use variables in GetDefectPayload