Refactoring of EventState and EventProcessor to be less confusing.