remaps new_window and close_window