removing direct window references