Hard to start and bad idling may be caused by loose, leaky vacuum hoses around the throttle body, or a bad MASS AIRFLOW SENSOR. It could be giving the ECU all wrong air data.
The MAF is a DENSO sensor, trapezoid -shaped piece with a connector, sitting on top of the air duct, between the air filter box and the throttle body.
Check to make sure connector is plugged in securely and all wires and terminals are intact and seated properly.
You can try to clean the sensor element by spraying it with non-residue contact cleaner. Since it's hard to test it electrically, the sure system test is to swap in a known-good MAF sensor from another car. Most Toyota and Lexus engines use the same DENSO MAF sensor.
After cleaning or swapping the MAF sensor, reset the ECU by removing the battery's negative cable and wait 5 minutes for complete data erasure. After this the ECU will work with new MAF data and remap the air/fuel mixture.