Added notes
Fixed comments; Changed trial_type global