  We give a modification of Yu's construction of supercuspidal representations
of a connected reductive group over a non-archimedean local field. This
modification restores the validity of certain key intertwining property claims
made by Yu, which were recently proven to be false for the original
construction.
  This modification is also an essential ingredient in the explicit
construction of supercuspidal L-packets. As further applications, we prove the
stability and many instances of endoscopic character identities of these
supercuspidal L-packets, subject to some conditions on the base field. In
particular, for regular supercuspidal parameters we prove all instances of
standard endoscopy. In addition, we prove that these supercuspidal L-packets
satisfy a certain property, which, together with standard endoscopy, uniquely
characterizes the local Langlands correspondence for supercuspidal L-packets
(again subject to the above mentioned conditions on the base field). These
results are based on a statement of the Harish-Chandra character formula for
the supercuspidal representations arising from the twisted Yu construction.
