removing unused resources