Core algorithm changes