Adding functions related to detaching namespaces, but it's not quite working flawlessly.