Consolidate gather_assignment calls for patterns

Also addresses comments about tests