Here are your parts includes a wiring diagram.
Replacement parts for MAYTAG MDE8400AYW DRYER- ELE | AppliancePartsPros.com
By "timer does not time out" I am assuming you mean that it does not advance.
Does it not advance in both timed dry and auto modes?
If it is OK in timed dry, have you cleaned your moisture sensor bar (Item 6 in Section 8). If there is any dirt etc between the bars the unit will think the clothes are still wet and will not advance the timer.