Move functions to appropriate namespaces.