getting rid of unused and unnecessary chunks