Refactored pause into pauseWindow

Refactored due to reported compatibility issue