The 500R can be replaced by a diode reversed biased. It is used to discharge the circuit when power is removed.
The diode is used to turn the transistor and LED on when the output is low indicating charging in progress I guess. If it was not there then it would interfere with the circuit when in float mode.
The capacitor is to prevent the op-amp from oscillating.