refactoring plugin registration to allow dynamic namespaces