89 3vz-e automatic

I have an ongoing problem that is driving me crazy. Typically, at a cold start my coolant temp sensor does not register. The temp gauge registers below bottom and the check engine light comes on. After driving 30 seconds the gauge registers the correct temp however the check engine light remains on. Normally, perhaps 8 of 10 times I have to shift manually, as the trans will not downshift. Nor will it shift into overdrive. This problem seems to fix itself after about 5 miles of highway driving. Last week I replaced the speedo cable thinking this would solve the problem but no such luck. Before the new cable the OD light blinked all the time. Now it blinks sometimes. Normally I get diagnostic code 22 for the coolant sensor. However after clearing this code I sometimes get 41 TPS and 51 Switch condition signalààBecause of the codes my thinking is the Trans problem is electrical. Any comment are welcome. Thanks All