Updated trial-type sorting logic to reflect the (correct) definition of switch-n and nonswitch-n trials, which in both cases hinges on n being the number of NONSWITCH trials preceeding the current trial (rather than the number of preceeding trials of the same type as the current trial)