Well, you have a group of problems, only related by the color of paint surrounding them. And the more info, the better.
IMHO -
1. Speedometer is related to ABS wheel sensors. From the RAVE tech manual:
The ABS ECU (C0501) provides a road wheel speed signal to the EAT ECU (C0932) via the CAN BUS on YN (low) and YB (high) wires. This information is relayed to the ECM (C0371) via the CAN BUS on YN (low) and YB (high) wires.
The ECM drives the speedometer. The ABS sends signal to ECU and the electronic transmission. This same arrangement is used in some other models, the wheel sensors are averaged and the computed speed is supplied to several modules for use in their particular function.
2. A simple as it may sound, a new battery can clear up a lot of little gremlins. Everything is packed with electronics, and you need a tip top battery and clean terminals.
3. Did you replace all wires and plugs, or just swap around? Would want those to be new. May also be time to clean the MAF and throttle body with spray made for the purpose.
4. Need more info on click - speed of click, location on engine.
Also, please be sure you have a copy of the RAVE, which has complete set of factory manuals on your truck. Free download below.