Pulled in Jeremy Hare's changes to quickCurve.