Remove useless definitions from resources