Enclose case strings in quotes as they were noted as constants before. Update sprintf to double quotes again but escape $ characters to make code consistent.
Use four spaces for indentation
Remove uneccessary firing of exception events