Separating the wiring and adding the capacitor didn't work.
The codes change to the same values every time, but when I put the "new" codes in the sketch, the serial monitor gives me the original codes. When I change the speed on a different section of the sketch, the IR codes change to a different value again.
Also, switching to a different remote didn't help either.
I am going to see if going to an H-bridge will help but that may take a couple of days before I have the time.