Event sort order code tidy