Reverted Decruft to using unloadNamespace

detach had problems unloading packages such as coda