Strip redundant namespaces