cleaning up global namespace and renaming namespaces