removing unneeded resources