Add more confirm dialogs and improve the application flow handling.