Cleanup end-entity.