Adding an AppEvent class to handle app events