Separated events from script