Added overlap detection for slopes