upgraded globals, simplified stdlib iface, fixed dll export leaks