Merge overlapping patterns, move declarations