Removes unused domains
Closes #1017