remove unused and refract