Use https for getting files from github
support for module-level globals and some cleanups