P0104 = Mass air flow sensor, the sensor gives air intake volume information to the ECM, when the wire in the sensor gets dirty than the signal can become out range and provide false volume of air entering the engine, check for vacuum leaks and also the connector for corrosion.
P0108 = Map sensor, the sensor may have a seal that is leaking vacuum, or it is bad.
Both of these codes can cause the symptoms your having and using a scanner to monitor the signal would help.
Again check connections and grounds, check for vacuum leaks, with engine running you can use carb cleaner with the straw to direct the spray at the mounting area of both parts. Use a rag close by the areas you spray to catch drips.
If there is a leak the cleaner will affect idle quality.