removed all the unneeded functions out of the code

especially all the intersection functions