How did the CIA's mission change after communist takeovers in Eastern Europe and China occurred?

Also, Summarize the controversy that surrounds the CIA and its activities.