code improvements

-> intersection points now working
-> algorithim for intersection points is now encapsulated in function
-> useless intersectionpoints need to be deleted