Clean up the UI and trigger the modal popup