Cleanup handling for domains.