SSP-2599 - code clean up and refactored key driven event handling