I see in the pictures that you have a breather in the valve cover. There's supposed to be a hose from the valve cover to the throttle body. Instead you have this breather and you have the connection at the throttle body plugged. This can create problems. What you are doing by using the breather is allowing air to be ingested that is not being measured by the MAF. The pcv system takes in enough air to throw things off if it's not included in the MAF measurement. It will mess up A/F mixture.
Loose the valve cover breather and put the hose / pipe back in between the valve cover and throttle body where it belongs. Double and triple check all vacuum lines and connections. Make sure there are no leaks and all connections are tight. Believe it or not, even small leaks can cause problems. But in your case, you already have a big leak. Basically, not having the MAF measuring the pcv air ingestion is a huge leak as far as the ECU is concerned.
Loose the valve cover breather and put the hose / pipe back in between the valve cover and throttle body where it belongs. Double and triple check all vacuum lines and connections. Make sure there are no leaks and all connections are tight. Believe it or not, even small leaks can cause problems. But in your case, you already have a big leak. Basically, not having the MAF measuring the pcv air ingestion is a huge leak as far as the ECU is concerned.