Changes to add modal mode to the overlay