The problem with the M16 was that the rifle was tested with spherical gun powder. The government bean-counters decided that cylindrical gun powder could be used. That powder caused the rifle to become fouled. This left alot of troops on the battlefield with no weapon.
Actually,the M16 was originally intended to use IMR type powder.The problems with jamming and deposits in the gas tube were a result of using ball powder,specifically ball powder that had been made with too much calcium carbonate.The calcium carbonate is used to neutralize the acidity of the powder and stabilize it.