VID-1800 Use window namespace for globals