Fixing NAMESPACE and associated calls to specific functions