Fix overlaps
Factorize code
Fix overlaps for 2D regions