Add code to remove stale events (needs testing)