Removing unneeded entities