Close window and return to layout