Added detection for vertical and horizontal targets, adjusted thresholds.