Simplify globals and namespaces

*Ready to deploy.*