Differences also work now.
made line_intersect a proper function.