Rework events and extract names into constants.