Renamed logic to events and compatibility fixes.