Deleting unnecessary stuff from res