entity cleanup