Removing unnecessary resources