cleaned up how the global module was exposed. updated examples