Simplified separator snapping code.