removes global variables. window not defined?