Moved revealWindow variable so it can be accessed in other functions