remove unnecessary resources