removing global vars for gui elements
removing document references from the node image references