Moved globals to NestedType namespace when used with script tag.