Hello and welcome to justanswer.com
It looks like you have two problems. The dtc P0401 is most like cuased by a faulty DPFE sensor and possibly clogged EGR passages. The other codes are lean codes most likely from a vacuum leak. This is also causing your car to idle bad. Those cars had problems with the vacuum hoses and tees swelling and leaking. You should try spraying the intake and vacuum lines with carb cleaner. If the rpm changes or the engine runs different then you found the area of the leak.
Hopefully this answers your question and you accept. Positive feedback is appreciated and please let me know if I can assist you with anything else.