Add loader function to generate namespace.