Move functionality into removeEntity()