Confirm if it is really P0163 code. You may want to scan it again (free service at Autozone or Advance).
http://www.contour.org/FAQ/FAQ.php?s=probs&displayid=10
Bank 1 is firewall side. Bank 2 is radiator side.
If the code is P0136, then chances are you got water into the mileliminator or connector for Bank 1 lower O2 sensor. Clean and dry it. Then reset the code.
As for P0401, check if the hoses for the EGR are broken. Also check the hoses which run from the exhaust to the DPFE sensor. If the hoses are fine, maybe time for a new DPFE sensor.
http://www.contour.org/ubbthreads/showflat.php?Cat=&Board=trouble&Number=1014982&Forum=trouble&Words=p0401&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=allposts&Main=1014942&Search=true#Post1014982
EGR test.
Modified test for EGR (per Ray and Steve):
(remove the green vacuum hose from the top, be careful as it is brittle, and apply a vacuum (attached a small hose and suck on itl) to see if the car stumbles while running. This indicates a properly operating EGR.
Does it work properly?
NO: The EGR valve is defective or the EGR passages are clogged. Check (and clean, if needed) the passages behind the Throttle Body. Purchase a TB gasket, and remove the air plenum (rubber accordion tube) then remove the TB. Clean the EGR passage (small cut-out in the outer edge of the TB's mating surface) really well, install a new gasket and re-attach the TB. If the passages are clear, the EGR valve is defective. While rare, they do fail.
YES: The EGR valve works and the passages are clear. The likely fault is the DPFE sensor or its sample hoses, followed by the EVR solenoid or the PCM. May also be caused by interconnecting vacuum lines or electrical connections.
From Autozone,
http://www.autozone.com/servlet/UiBroker?ForwardPage=/az/cds/en_us/0900823d/80/1b/ca/1e/0900823d801bca1e.jsp
Picture from Chongo. "Did someone call me out.......LOL" Chongo.
here you go.