Refactoring for NamingDirectory integration