Working on the query to get the events

Need to do some clean up