added support for removing entities. should have done this a while ago.