Remove unnecessary resources.