Improved removing custom namespaces