contract & code formatting changes with an extra polygon intersection refactor