ADDED
- Function to get past, ongoing and future events
- Code split up