Update: refactored events_handling