Event listeners are refactored.