Fixes #82 Refactor: unload modules in reverse order - from the last to the first
Fixes #80 Wrap global variables