Grid now stores sorted array at all times. Performance increased a bit.