Completely contrary to what all the Starbucks Leftists here would tell you, Marx did in fact advocate racialism and genocide as his quotes and writings amply demonstrate. He was the prime ideological bedrock for the structural groundwork of Soviet Communist ideology as well as early National Socialism. Hitler read Marx as did many early Nazis then tuned Marxism, as did the Soviets, to their own nations cultures.
Goebbels even wrote a New York Times piece on how similar Nazism and Marxism actually were.
Trying to remove Nazi or Soviet ideology from Marxism is like trying to remove milk from breakfast cereal.