Added intersection check with connection lines between features.
Small refactoring.