wur is grey, 5th inj is blue and 5th inj thermoswitch is brown.
wur has red/white and brown wire
5th inj has black and green/white wire
thermoswitch has green/white and red/black wire
spade connector with 2 black wires goes to pin 50a on the starter motor. its not an earth, its the live feed for the 5th injector.
puff of smoke sounds to me like there is a problem with the wiring, remove the battery, starter and alt wires and give em all a damn good clean and refit. gearbox earth is common cause of slow turnover on starter, to rule in/out, run a jump lead from battery -ve to one of the starter mounting bolts