Close window and return to main window