Implement global purge.

Closes #11.