Added a global object to share variables between script instances.