cosmetics, comments and fix of the getIntersection function