Clean up resource dependencies.