Store points and segments in a std::set rather than a simple list
Fix intersects