Refactor namespaces