Worked on the OrganizeEvents function.