Refactored some code and changed the return types of some helper methods
for getting the intersections.