I have a 2002 325i e46. Read jjofj post on misfires, cold start post and it was very informative.. I'm having a somewhat difficult problem. I started getting rough idle on cold starts and engine would shut off once i tried to put into gear and drive. Got codes P0171 and P0174 with P1351. Started with vacuum leaks. Changed lower CCV hose, oil dipstick o-ring, o-ring on DISA (actual disa valve was in good shape), SAP hose from back of intake manifold to SAP valve, air filter, SAP hose from SAP valve to SAP. Car seemed to be running same way, maybe a little worse, checked codes again after resetting and got multiple misfire codes including 1351, 1344, 1346, 1342, but no 171 and 174, however maybe I did not drive car around enough to get those codes again. Car also seems to have low power. What is weird is that every time I clean my MAF sensor with MAF sensor cleaner, the rough idle is not as bad and I am able to drive car and eventually car runs okay after warming up. Is this indicative of a faulty or old MAF sensor? Another fix I was considering was the Valve Cover gasket, grommets and the Vanos seals with anti rattle kit, since this could create some a vacuum leak. Any help will be appreciated. Thank you.