removed a redundant new
rewrote global variable storage (using ESM variant type now)
removed a redundant function for listing global variables