removes unused resources