Delete unneeded entities