Refactored event, participant, and attendance functions into services.