Refactored dialog title management.