Created a make_intersection function which wraps some of the boiler plate code.

Replaced the boiler plate.