Improved performance and style of function intersect.