Load and unload namespaces as cleanly as possible.