Refactor main event stream