Refactored events_controller