Well - you've pretty much done a minor tune up on the car (plugs, cleaned off the MAF/IAT sensor). The engine doesn't really need much more than that - a change in the PCV vlave would be good to do every 30K or so, pretty cheap and saves you headaches later.
Codes P0171 and P0300 together leads me to some possible issues: could be a bad O2 sensor(s), could be a bad or sticking fuel injector(s), could be a bad coil over plug unit (I believe these were started in 2000 instead of separate wires and coil pack). Did you notice if any of the sparkplugs look much different than the others (color, fouling, etc)? Sometimes a leaking cylinder will cause these issues as well - a leakdown and compression test can rule it out.
A leaking intake system and loose vacuum lines can also cause these issues. As well as a dirty throttle body. I would recommend checking the vaccum lines, looking over the front of the air box all the way to the throttle body looking for leaks, replace the PCV valve, and cleaning the throttle body to complete the tune-up. If that doesn't do the trick - I'd check as see if they can back probe the O2 sensor of monitor it with a data logging scanner to check operation. Swapping coil packs would be another option - to see if the problem gets worse / same / or better. Injector flushing sometimes works - but usually if the injectors are that dirty - be easier to get them replaced with new ones. Fuel filter can be checked - kind of a pain since it is in the tank - usually a nonmaintenance item, does not need to be replaced under normal circumstances. The fuel pressure regulator is more interesting - also in the tank - if everything checks OK, then the regulator could be bad (ie. not enough or too much fuel pressure). Kind of unusally - but weirder stuff has happened.
Good Luck.