It was focused around the doctrine that if one falls, everyone does. So if Vietnam fall, it would then spread to Burma, India etc. So a doctrine that is easy to criticize. So yes, it was focused on preventing the spread of communism, but in some cases it did get rid of it, such as the coup in Chile 1973.