Cleanup and fix domain