Refactor and simplify the 'exit to broadcast' functionality