Extract namespaces