Added manageWindow() method prototype.
Implemented manageWindow() prototype, which dictates the program will end if the window is closed.