Delete unused elements