removing unnecessary documents