How did the Ming dynasty remove Mongol influence in China?

They helped spread Buddhism throughout all of China.
They limited what could be shown in Chinese literature and art.
They expanded the use of legalism throughout the entire empire.
They brought back ideas from Confucianism, such as civil service exam