Various tweaks to improve accuracy.