Add methods to hide and close the window.