Use cached status
Use closeWin function for closing stacked Windows.

+ fixed Linter errors